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

> So if I create a highly unusual ICC profile where the A2B0 tag says that pixel value `(1,2,3)` maps to XYZD50 value `(0.385, 0.717, 0.097)`, then this pixel will exactly match the `color(srgb 0 1 0)`, because they have the same value in XYZD50 space.

This turns out to be a can of worms.

Chromium's CMS implementation of general A2B parsing (both for perceptual and for relative rendering intents) has bugs. We [interpret XYZD50 wrong](https://issues.skia.org/issues/40044912) and also likely [interpret Lab wrong](https://issues.skia.org/issues/40044907). From what I can tell, there isn't a single profile that uses A2B that is interoperable.

> I'll have to write up an example profile to verify this, but I'm fairly certain that all browsers prioritize A2B0 (perceptual mapping) above A2B1 (relative mapping).

Nope! In the presence of both A2B0 (perceptual) and A2B1 (relative), Chromium and Firefox use A2B0 while WebKit prefers A2B1. When only A2B0 is present then that is used by all three. And only Chromium parsed the A2B1-only profiles I produced (but they may be malformed for all I know). And then you layer the bugs on top of this.

So A2B ICC profiles are interoperability wasteland. I stick by the theory that one can color match via the PCS (and it looks like that's the case), but that theory would need to wade through a wasteland of bugs to be of any value it's also a fairly marginal case.

We should also add some WPT tests.

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


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

Received on Wednesday, 27 March 2024 21:58:02 UTC