function _color_hue2rgb
_color_hue2rgb($m1, $m2, $h)
Helper function for _color_hsl2rgb().
File
- modules/color/color.module, line 780
- Allows users to change the color scheme of themes.
Code
function _color_hue2rgb($m1, $m2, $h) { $h = ($h < 0) ? $h + 1 : (($h > 1) ? $h - 1 : $h); if ($h * 6 < 1) { return $m1 + ($m2 - $m1) * $h * 6; } if ($h * 2 < 1) { return $m2; } if ($h * 3 < 2) { return $m1 + ($m2 - $m1) * (0.66666 - $h) * 6; } return $m1; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!color!color.module/function/_color_hue2rgb/7.x