Re: [csswg-drafts] [css-color-4] [css-color-5] inconsistent mentions of powerless components in `white`. (#8609)

@facelessuser [wrote](https://github.com/w3c/csswg-drafts/issues/8794#issuecomment-1536240587):

> The requirement to force colors to white or black by setting chroma/hue and a/b to zero when the lightness is 0 or 100 during the conversion can seem jarring in these situations, and I wonder if such requirements are better suited in gamut mapping and not conversion. These requirements in conversion are essentially gamut mapping these extreme "lightness" cases, but nothing else.

Given the amount of [unintuitive results](https://github.com/w3c/csswg-drafts/issues/8609#issuecomment-1490261307) and [lack of interop](https://github.com/w3c/csswg-drafts/issues/8943) in this area with non-hue missing values, I agree that it makes sense to reconsider what a color like `oklch(1.0 0.25 110)` means. Compare with [`oklch(0.95 0.25 110)`](https://colorjs.io/apps/convert/?color=oklch(0.95%200.25%20110)&precision=8)  which is a deep yellow, [`oklch(0.97 0.25 110)`](https://colorjs.io/apps/convert/?color=oklch(0.97%200.25%20110)&precision=8) which is almost exactly sRGB yellow, and[`oklch(0.99 0.25 110)`](https://colorjs.io/apps/convert/?color=oklch(0.99%200.25%20110)&precision=8) which should be as saturated as sRGB yellow but lighter (gamut mapping desaturates this to a pale yellow) then `oklch(1.0 0.25 110)`  and indeed `oklch(1.0 0.5 110)` are very saturated yellows which are so light that gamut mapping brings them to white.

Describing them like that, even though we can't display those ultra high chroma light colors, lets us reason about them and interpolate from them. Just like we do with unrealisable primaries like the ProPhoto-RGB ones and indeed the XYZ primaries. 

It also avoids the nasty discontinuities when chroma is very close to, but not exactly, zero; and when lightness is very close to, but not exactly, 0% or 100%.

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


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

Received on Wednesday, 5 July 2023 17:58:43 UTC