Same name in other branches
- 8.x-3.x advagg_css_minify/yui/CSSMin.inc \CSSmin::hue_to_rgb()
1 call to CSSmin::hue_to_rgb()
- CSSmin::hsl_to_hex dans advagg_css_minify/
yui/ CSSMin.inc
Fichier
-
advagg_css_minify/
yui/ CSSMin.inc, line 703
Classe
Code
private function hue_to_rgb($v1, $v2, $vh) {
$vh = $vh < 0 ? $vh + 1 : ($vh > 1 ? $vh - 1 : $vh);
if ($vh * 6 < 1) {
return $v1 + ($v2 - $v1) * 6 * $vh;
}
if ($vh * 2 < 1) {
return $v2;
}
if ($vh * 3 < 2) {
return $v1 + ($v2 - $v1) * (2 / 3 - $vh) * 6;
}
return $v1;
}