-
Notifications
You must be signed in to change notification settings - Fork 60
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
[WIP] Restore the proper scale of Lab and Lch #57
Conversation
The tests are still wrong and needs to be tweaked. Some of the inaccuracies are huge, like
|
I've used a tolerance of 0.05 which translates to 5 when scaled. I wonder if this is due to the differences in the default white point being used
|
Nope. Color mine uses the same values:
But the formula in color mine is incorrect
Its not using the transformation function
I guess we need a better set of tests |
We have a test for Xyz <-> Yxy, already from the CIE tables. https://www.rit.edu/cos/colorscience/rc_useful_data.php has a few calculated values for Xyz, Lab and Lch ( CIEDE200 Color Difference formula, Pointer data). But it uses a 10 degree observer. This should cover the CIE spaces. http://stackoverflow.com/questions/3620663/color-theory-how-to-convert-munsell-hvc-to-rgb-hsb-hsl points to http://www.cis.rit.edu/research/mcsl2/online/real_sRGB.xls which has rgb to xyz and yxy conversions. The rgb variants conversions (hsl, hsv, hwb etc.) need to be figured out Just adding it here for reference if the tests need to be updated. |
Thanks, I'll take a look at them later and see if it's possible to piece things together. |
☔ The latest upstream changes (presumably #56) made this pull request unmergeable. Please resolve the merge conflicts. |
Turns out the accuracy of the Yxy values were too low, so I'm currently working my way through them, adding more decimals. |
So the actual scaling part is done? Is it just the tests remaining? |
Yes, unless I forgot something. I'm pretty much just copy-pasting XYZ numbers to the easyrgb calculator, dividing them by 100, converting, and copy-pasting the xyY numbers back. |
Closed by #61 |
This restores the scale of
Lab
andLch
to be the same as in all of the specifications within reach. That is:Lab::l
andLch::l
goes from 0 to 100,Lab::a
andLab::b
goes from -128 to 127,Lch::chroma
goes from 0 to about 128-181.This is a breaking change, since everything that uses these values directly will be wrong. Closes #49.