Re: [csswg-drafts] [css-color-5] Gamut mapping in HSL/HWB (#7107)

> So my question: does gamut mapping happen in the sRGB space for HSL and HWB colors, or in the HSL/HWB space?

And thus, the answer to that question is "neither". All CSS gamut mapping occurs in OKLCH. The gamut mapping is triggered by the need to convert an sRGB color to HSL/HWB, which requires an in-gamut color.

Ah, I just spotted

> This [CSS gamut mapping algorithm](https://drafts.csswg.org/css-color-4/#css-gamut-mapping-algorithm)
applies to individual, Standard Dynamic Range (SDR) CSS colors which are out of gamut of an RGB display

needs to be extended to also cover conversion to HSL/HWB.


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


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

Received on Monday, 7 March 2022 19:45:17 UTC