Re: [csswg-drafts] [css-color-4] Converting out of gamut colors to `hsl` can result in negative saturation with the sample code (#9222)

Yes, `1.5` is an exaggeration :)

It was this test that triggered a failure on my end : https://github.com/web-platform-tests/wpt/blob/00e27884bfe6426de9c3e7c33e32db76bc1faed8/css/css-color/parsing/relative-color-out-of-gamut.html#L52

`hsl(from lab(100 104.3 -50.9) h s l)`

This eventually becomes `rgb(255, 246, 244)` and to me this seemed to be caused by the negative saturation returned by the sample algorithm for `hsl`.

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


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

Received on Monday, 28 August 2023 20:46:15 UTC