Re: [csswg-drafts] [css-color-4] Channel clipping breaks author expectations, especially when using 'perceptually uniform' spaces (#9449)

> If we were to bake gamut mapping (to, say, `rec2020`) into the definition of `oklab` and `oklch`, then that would make the `oklch(90% 90% 0deg)` problems in this issue go away.

keep in mind that none of this is limited to `oklab` and `oklch`.
Gamut mapping as currently specified is an integral part of almost all color notations. (only legacy `rgb` and `hsl` do not rely on it?)

`oklch` is currently being advertised as a solution to specific color transformations and this means that more people are seeing the lack of gamut mapping today with `oklch`. It doesn't mean that the need for gamut mapping is limited to `oklab` / `oklch`.

-----------

I think that fixed gamut mapping to `rec2020` is better than nothing at all.
Colors mapped to `rec2020` are at least similar to values gamut mapped all the way. (example with blue/green mix in lch : https://codepen.io/romainmenke/pen/NWJEWdW)

I also couldn't create an example where a value gamut mapped to `rec2020` would result in serious contrast issues and where those contrast issues would be resolved by gamut mapping to `displayP3` or even `srgb`

That would also imply that the current specifications for `css-color-4` and `css-color-5` largely remain valid.

As I said in a previous [comment](https://github.com/w3c/csswg-drafts/issues/9449#issuecomment-1936036168), a property might also be useful here so that authors can pick between `rec2020`, `display-p3`, ... I realize that this is more complexity.

-----------

> > The only way to prevent this is to force interpolation into a space where all colors are always in-gamut.
> 
> I think that's a direction to a robust solution to all of the problems here!

That doesn't help with the current situation, which is that `css-color-4` and `css-color-5` have shipped and that they shipped without some form of gamut mapping.

I think it would be more productive to keep focus on finding a way to have some form of gamut mapping for what has already shipped.

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


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

Received on Monday, 12 February 2024 14:35:41 UTC