Re: [csswg-drafts] [css-color-6] color-contrast() should allow specifying multiple contrast algorithms that need to be satisfied (#7357)

>     The contrast algorithms we've seen, whether WCAG 2.1 or APCA, take two Ys as input

Not exactly. WCAG 2.1 takes two luminances (CIE Y) as input. APCA uses a non-standard transfer function of linearizing sRGB and thus the `Ys` term is not the same as CIE Y, and cannot be computed from it. It requires the individual non-linear color component values as starting values. I [reported that here](https://github.com/w3c/silver/issues/643) and the conclusion was that this is intentional, nt an approximation error.

>    Y and L* are the same physical quantity. 

No.

> They are pure functions of each other. They can be converted to and from each other with no other inputs.

Yes.

>    Thus, given a L* and contrast measure, we can find the L* that contrasts

Yes. We convert L* to Y, compute the other Y, and then can if we want convert that back to L*

>    Given that, the L* and the L* needed for contrast, we can calculate delta L* required for contrast

For _that color_, yes, _if_ we want to replicate the WCAG 2.1 algorithm. Doing so seems pointless because the problem with WCAG 2.1 is that is uses a non perceptually-uniform measure (CIE Luminance) instead of a perceptually uniform measure (CIE Lightness).


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


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

Received on Wednesday, 13 July 2022 13:14:22 UTC