Skip to content

Commit b4bb936

Browse files
Merge pull request #89 from jackwilsdon/fix-monochrome-hue
Ensure monochrome hue is honored correctly
2 parents eef89f0 + 0f3c569 commit b4bb936

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

randomColor.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@
110110

111111
function pickSaturation (hue, options) {
112112

113-
if (options.luminosity === 'random') {
114-
return randomWithin([0,100]);
115-
}
116-
117113
if (options.hue === 'monochrome') {
118114
return 0;
119115
}
120116

117+
if (options.luminosity === 'random') {
118+
return randomWithin([0,100]);
119+
}
120+
121121
var saturationRange = getSaturationRange(hue);
122122

123123
var sMin = saturationRange[0],

0 commit comments

Comments
 (0)