-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
Setting lab lightness value does not work as expected? #108
Comments
Thank you for the detailed bug report.
It probably is. Either with the precision of the conversion (hopefully not) or with the sRGB gamut boundary limitations.
I'm not sure. We should look into it. |
The problem is that an attempt to set the color to Maybe you expected some other method of bringing the color into gamut (e.g., keeping the LCh hue constant and adjusting the LCh chroma if needed — this would give pure white when setting lightness to 100), but currently no other methods except clamping the RGB values are implemented. There is also another issue — rounding of the printed Lab values loses some information (as you noticed when comparing results for |
@sigprof Thank you for the insights and thoughts. I currently don't find the time to work on this myself. |
I would expect
pastel set lightness 100
to set a color's lab lightness to 100. The code does seem to try and setlab.l = value
but it doesn't actually result in a lab lightness value of 100. Which seemed odd.I have no idea if this is an issue with converting between colorspaces or just unavoidable.
At 149, the lab lightness value seems to be shown as 100, but it isn't pure white.
At 156, it finally reaches pure white.
You can keep try setting it to 100 lightness and it will increase slightly which is odd
The text was updated successfully, but these errors were encountered: