Re: [csswg-drafts] [css-color-4] Disagreements over gamut mapping (#7610)

> > Following the spec on this point would make the result of gamut mapping visible via getComputedStyle(element). Do you think the spec should change on this point?
> 
> > Oh, very interesting. I don't believe that was in the spec when I was last working on this (I made an intentional change to match the spec and to not clamp around a year ago if I remember correctly), so thank you for bringing this to my attention.
> 
> > @svgeesus @LeaVerou, what was the driving motivation behind this change? To me, it has some unfortunate downsides, and I am not clear what you gain from it over the (or perhaps just my) previous interpretation which was that out-of-gamut colors would be preserved all the way to use time.
> 
> My recollection is that CSSWG went back and forth on this, between computed value time and used value time; and the main driver was handling system colors in forced color mode, and handling currentColor.
> 
> I think that mapping to the display gamut should be as late as possible, so that out of gamut values like `rgb(100% 100% -34.627%)` (which is `color(display-p3 1 1 0)`) round-trip cleanly, preserving author intent.
> 
> I would need to dig into the commit history to see when that was changed and in response to what issue, but from memory it was to do with handling system colors.

I am a bit confused about this. It seems like the current spec text requires `color(srgb 2 0 0)` to gamut map to within the sRGB gamut at computed value time ("they are [css gamut mapped](https://drafts.csswg.org/css-color-4/#css-gamut-mapped) using a relative colorimetric intent which brings the values within the range 0/0% to 1/100% at computed-value time."). Is the distinction you are making here that the mapping at computed value time is only for the `color()` function colors and that the legacy `rgb()` syntax colors should not gamut map at computed value time?

If you can find the details of the "forced color mode, and handling currentColor" rationale, I would be quite interested. 

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


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

Received on Thursday, 18 August 2022 17:05:07 UTC