Skip to content

Commit c3dc0e0

Browse files
kylekatarnlsTorbenKoehn
authored andcommitted
Fix #8 Allow colors differences with white/black colors (#9)
1 parent f5db6ab commit c3dc0e0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Phim/Color.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1697,15 +1697,14 @@ public static function getDifference(ColorInterface $color, ColorInterface $comp
16971697
private static function cieLabToHue($a, $b)
16981698
{
16991699

1700-
17011700
$bias = 0;
17021701
if ($a >= 0 && $b === 0)
17031702
return 0;
17041703

17051704
if ($a < 0 && $b === 0)
17061705
return 180;
17071706

1708-
if ($a === 0 && $b > 0)
1707+
if ($a === 0 && $b >= 0)
17091708
return 90;
17101709

17111710
if ($a === 0 && $b < 0)

0 commit comments

Comments
 (0)