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

I had thought that we were blocked on @ccameron-chromium reviewing the [various faster gamut mapping options](https://apps.colorjs.io/gamut-mapping/?) that had been assembled by the community. But in

 - https://github.com/w3c/csswg-drafts/issues/10579

@ccameron-chromium [says](https://github.com/w3c/csswg-drafts/issues/10579#issue-2411507542):

> There were lots of algorithms listed in issue 9449, so I'd like to collect a reduced list of candidates here to discuss.

> To provide an extremely short list:

and then lists two, one of which is either the same as, or a slight simplification of, the algorithm currently in the spec and the other is "Projecting in Rec2020 YUV along constant Y".

Regarding the YUV option, [I said](https://github.com/w3c/csswg-drafts/issues/10579#issuecomment-2231504287)

> It doesn't make the UV plane perceptually uniform, of course.

As far as I can see, _none_ of the proposed faster algorithms have been evaluated. It isn't clear if they have been rejected (and if so, why) or not.

So the current status is, [as described](https://github.com/w3c/csswg-drafts/issues/9449#issuecomment-2782458251)

> This gamut clipping technique that browsers are using makes `oklch()` unreliable and practically unusable.

Content authors are left with the awkward choices of hard-coding to `display-p3` or using some preprocessor to implement sensible gamut mapping. Clipping is not a sensible or usable strategy, for generated colors substantially outside `display-p3`.



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


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

Received on Wednesday, 4 June 2025 14:32:28 UTC