Skip to content
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

Correct scaling on random distribution of Lab/Lch #189

merged 1 commit into from
May 16, 2020


Copy link

@okaneco okaneco commented May 16, 2020

Add the proper scaling factor for random color distribution in Lab/Lch.

Lab/Lch brightness was being treated as 0-1 instead of 0-100.

Copy link
Contributor Author

okaneco commented May 16, 2020

I finally got around to playing with the "random" feature. I was curious what the distributions looked like for each space and generated an image of random pixels for each one. Something seemed off with Lab/Lch as you can see in the image. When I checked the code, I realized a factor was overlooked or lost along the way. The range of Lab/Lch is treated as 0.0 to 1.0 instead of 0.0 to 100.0. The other spaces seemed to have appropriate results.

Left side is before the fix, right side is this PR. Top is Lab, bottom is Lch.


Copy link

Ogeon commented May 16, 2020

Ah yes. Good catch!

bors r+

Copy link

bors bot commented May 16, 2020

Build succeeded:

@bors bors bot merged commit 817daed into Ogeon:master May 16, 2020
@okaneco okaneco deleted the randfix branch May 16, 2020 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants