Skip to content

Commit

Permalink
Honor the monochrome option (davidmerfield/randomColor#89 by @jackwil…
Browse files Browse the repository at this point in the history
  • Loading branch information
mundschenk-at authored and mistic100 committed Apr 16, 2018
1 parent a871e04 commit c7c824f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/RandomColor.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ static private function _pickHue($options)

static private function _pickSaturation($h, $options)
{
if (@$options['luminosity'] === 'random')
{
return self::_rand(array(0, 100), $options);
}
if (@$options['hue'] === 'monochrome')
{
return 0;
}
if (@$options['luminosity'] === 'random')
{
return self::_rand(array(0, 100), $options);
}

$colorInfo = self::_getColorInfo($h);
$range = $colorInfo['s'];
Expand Down

0 comments on commit c7c824f

Please sign in to comment.