Re: [csswg-drafts] [css-color-6] contrast-color() and gamut mapping (#8539)

> I don't think it's necessary to require implementations to compute the actual value in the gamut in the output device. They just need to somehow ensure contrast. One way to potentially do that without computing the true device-gamut value would be to choose a contrasting value in the internal color space that has contrast, and analyze the hardware to ensure that whatever adjustments to that color which may occur won't make the color no longer contrasting.

I might be off here, but it sounds like there's an underlying assumption that there is only a small delta that gamut mapping can cause, and as long as you choose a color that is sufficiently contrasting, that delta won't affect it. However:
a) I’m not sure that assumption is always true, especially for smaller gamut devices
b) Even if it were true, the Level 6 `contrast-color()` syntax accepts specific color candidates, so the UA cannot simply nudge the result so that it's above that threshold, since they need to pick one of the candidates and return it, unmodified.

> Right. Nevertheless I think it suffices to ensure that the chosen color has accessibility contrast for the user when they look at it. Do you agree?

I agree that this the end goal, but specs usually need to describe the *how*, not just the high level goal. There are cases where certain details are left up to the UA, but typically there needs to be a reason, because the more details are left up to the UA, the more inconsistencies there are across browsers, and authors suffer as a result. If there is a better/faster algorithm to do this than gamut mapping both colors first, it's much better to talk it through and actually put it in the spec so that *all* implementations could benefit :) 

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


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

Received on Sunday, 27 August 2023 01:17:09 UTC