Skip to content

Commit c7c824f

Browse files
mundschenk-atmistic100
authored andcommitted
Honor the monochrome option (davidmerfield/randomColor#89 by @jackwilsdon) (#10)
1 parent a871e04 commit c7c824f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/RandomColor.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ static private function _pickHue($options)
107107

108108
static private function _pickSaturation($h, $options)
109109
{
110-
if (@$options['luminosity'] === 'random')
111-
{
112-
return self::_rand(array(0, 100), $options);
113-
}
114110
if (@$options['hue'] === 'monochrome')
115111
{
116112
return 0;
117113
}
114+
if (@$options['luminosity'] === 'random')
115+
{
116+
return self::_rand(array(0, 100), $options);
117+
}
118118

119119
$colorInfo = self::_getColorInfo($h);
120120
$range = $colorInfo['s'];

0 commit comments

Comments
 (0)