Re: [csswg-drafts] [css-color-4] Allow out-of-gamut HSL/HWB colors (previously "Move gamut mapping to a future spec") (#8444)

> Is this a library you're using for the `Color` object and the `to` function? The result I get for the conversions defined in the spec for `oklch(1 0 0)` is hue: 186 saturation: 481% lightness: 100%, so it's certainly out of gamut, but the saturation is non-negative.

This is using the color library that the CSS color spec writers maintain: https://colorjs.io/. Depending on the precision of the matrices, and the precision of the values that are maintained, that value could be slightly different.

The exact value is probably not as important, but the point is simply that the algorithm was never designed to give you an exact sRGB `[1, 1, 1]` white. And when lightness exceeds the SDR range, that is when you can get negative saturation. If CSS doesn't care right now, that is fine, but I just want to make sure all the info is there to make an informed decision.


-- 
GitHub Notification of comment by facelessuser
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8444#issuecomment-1462527031 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 9 March 2023 18:03:36 UTC