diff options
Diffstat (limited to 'apps/theming')
-rw-r--r-- | apps/theming/lib/Util.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php index f18194c3266..208cd42934e 100644 --- a/apps/theming/lib/Util.php +++ b/apps/theming/lib/Util.php @@ -106,15 +106,14 @@ class Util { * * @return array */ - public function toHSL($red, $green, $blue) - { + public function toHSL($red, $green, $blue) { $min = min($red, $green, $blue); $max = max($red, $green, $blue); $l = $min + $max; $d = $max - $min; if ((int) $d === 0) { - $h = $s = 0; + $h = $s = 0; } else { if ($l < 255) { $s = $d / $l; @@ -126,7 +125,7 @@ class Util { $h = 60 * ($green - $blue) / $d; } elseif ($green == $max) { $h = 60 * ($blue - $red) / $d + 120; - } elseif ($blue == $max) { + } else { $h = 60 * ($red - $green) / $d + 240; } } |