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

Oklab<f32> sRGB color spaces may be wrong #296

Open
NeverGivinUp opened this issue Aug 27, 2022 · 0 comments
Open

Oklab<f32> sRGB color spaces may be wrong #296

NeverGivinUp opened this issue Aug 27, 2022 · 0 comments
Labels
defect Something that isn't as or doesn't work as intended

Comments

@NeverGivinUp
Copy link
Contributor

Oklab and Oklch have a formally unlimited gamut and are made to be perceptually linear in the percievable gamut.
Okhsv, Okhsl and Okhwb are limited to the sRGB gamut. When converting a color from Oklab/Oklch to one of the sRGB-Ok* colors, the color must be mapped. To do that the maximum saturation of the color's hue is computed. This computation works fine in f64 but not in f32.

How To Reproduce

Run test palette::ok_utils::tests::print_min_max_srgb_chroma_of_all_hues with EPSILON = 1e-6

@NeverGivinUp NeverGivinUp added the defect Something that isn't as or doesn't work as intended label Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Something that isn't as or doesn't work as intended
Projects
None yet
Development

No branches or pull requests

1 participant