Skip to content

Commit 2ba1029

Browse files
Merge pull request #163 from eriklumbela/patch-1
fix issue with negative hues
2 parents 3d549fd + c1a8e56 commit 2ba1029

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

randomColor.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@
294294
if (hue >= 334 && hue <= 360) {
295295
hue -= 360;
296296
}
297+
if (hue < 0) {
298+
hue *= -1;
299+
}
297300

298301
for (var colorName in colorDictionary) {
299302
var color = colorDictionary[colorName];

0 commit comments

Comments
 (0)