-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What determins a luminosity of "Bright" #118
Comments
Just for shiz and grins, I took that sequence out until it looked stable. I generated 100,000 before the S min bottomed out at 37.93. That seems to be a rather low S for "Bright" though. |
That is curious, sounds like a bug. |
@davidmerfield I just checked the whole code and based on this statement “should always produce HSV colours with an S value greater than 55.”, the code works fine and actually there are no bugs in it. I checked “pickSaturation” function and it was perfectly fine (just a simple switch case to determine the range of saturation :) ) and to make sure, I checked the output. Then I checked “setFormat” function and its inputs (using ‘console.log(hsv);’) and again, everything worked round the clock and I concluded that hsv arguments are correct. I think @Xliff has misunderstood something or meant to use ‘hsvArray’ instead of ‘hslArray’ because saturation in hsl is calculated by a different formula. In short, if you want the ‘S’ value of hsl to be more than 55, you have to change the inputs or sMin, but if you want the ‘S’ value of hsv (or hsb) to be more than 55 (based on your last response), your code is perfectly fine :). |
@davidmerfield -- How are you defining "Bright" colors for RandomColor? I am attempting to write a numerical test for "bright" colors, and am wondering how it is defined in generation. From what I can see, it looks like the minumum saturation should be 55, however I can use this piece of code:
And the first color I get turns out to be [ 191, 53.43, 54.905 ], which has an S value lower than that. Can you please clarify?
The text was updated successfully, but these errors were encountered: