| @@ 211-225 (lines=15) @@ | ||
| 208 | * @param float $h The hue |
|
| 209 | * @return void |
|
| 210 | */ |
|
| 211 | private static function _hslrgb_low(float &$r, float &$g, float &$b, float $c, float $x, float $h) { |
|
| 212 | if ($h < 60) { |
|
| 213 | $r = $c; |
|
| 214 | $g = $x; |
|
| 215 | $b = 0; |
|
| 216 | } elseif ($h < 120) { |
|
| 217 | $r = $x; |
|
| 218 | $g = $c; |
|
| 219 | $b = 0; |
|
| 220 | } else { |
|
| 221 | $r = 0; |
|
| 222 | $g = $c; |
|
| 223 | $b = $x; |
|
| 224 | } |
|
| 225 | } |
|
| 226 | ||
| 227 | /** |
|
| 228 | * Handle high hue values |
|
| @@ 131-145 (lines=15) @@ | ||
| 128 | * @param float $h The hue |
|
| 129 | * @return void |
|
| 130 | */ |
|
| 131 | protected static function _hslrgb_low(float &$r, float &$g, float &$b, float $c, float $x, float $h) { |
|
| 132 | if ($h < 60) { |
|
| 133 | $r = $c; |
|
| 134 | $g = $x; |
|
| 135 | $b = 0; |
|
| 136 | } elseif ($h < 120) { |
|
| 137 | $r = $x; |
|
| 138 | $g = $c; |
|
| 139 | $b = 0; |
|
| 140 | } else { |
|
| 141 | $r = 0; |
|
| 142 | $g = $c; |
|
| 143 | $b = $x; |
|
| 144 | } |
|
| 145 | } |
|
| 146 | ||
| 147 | /** |
|
| 148 | * Handle high hue values |
|