Re: [w3ctag/design-reviews] CSS Color: lab(), lch() (#488)

>.... The L in Lab is certainly useful for many things .... but for color contrast calculations one needs a linear-light-intensity color space.........There is also a [very interesting and detailed study on color contrast](https://github.com/w3c/wcag/issues/695) which may be used in WCAG 3, replacing the simpler formula in WCAG 2; but again, starting from the luminance of the foreground and background colors.

@svgeesus   Hi Chris!

Sorry I'm just now commenting, things have been nuts in LA/Hollywood... I just wanted to mention a couple things in passing that you might be interested in.

### Readability
The first note is that the contrast values are intended to be more consistent in terms of functional readability than perceived contrast levels. I.e. actual readability is the goal.

### Perceptual
The contrast is reported as a percentage similar to Weber or Michaelson, not a ratio. The test values are linearized, and then have perceptual curves applied based on estimated adaptation. L* difference is sometimes used this way, though we are using slightly different curves (RLAB does something similar using different curves for foreground and background), and this has the advantage of a more accurate contrast/readability prediction.

### Adaptation
The eventual final version is intended to have a module that will estimate the immediate surround on green in addition to the foreground and background, as that predicts the global adaptation level, which used to provide a more accurate contrast prediction.

### Color/Hue
Also in the final (not yet shown)  the color/hue module will make some adjustments based on color saturation. This is mostly for red for those with protan CVD, and blue due to the non-intuitive way that blue affects perceived luminance, and therefore contrast.

### sRGB
As a side note, this is being designed for sRGB. Eventually a module could add-in support for other spaces (in fact, the algorithm is designed to allow a module for dynamic environmental response).

That said, in the interim sRGB is the _"ideal monitor for accessibility"_ for a few reasons.
- **Common Standard** It is the common space now, and expected to be available far into the future.
- **sRGB** allows for a consistent display type while other assertive technologies are being developed.
- **Color Vision Deficiency:** sRGB is nearly ideal for helping those with CVD. In particular, for those with Protanopia the red primary is of a short enough wavelength that a saturated red is still visible and presents only a perceived 15% to 30% luminance loss. P3 is slightly more of a loss. But the new UHD Rec2100 and Rec2020 have the red primary of such a longer wavelength that it would likely appear black (not perceived) for those with protanopia.

As such, for some vision types, Rec2100 et al will need content to be "Daltanized" for display. (Daltanizing is a best practice for CVD... but requires some assistive tech to remap the content colors).

Please let me know if you have any questions!

Thank You!

— _Andy_

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/488#issuecomment-642976797

Received on Thursday, 11 June 2020 23:16:48 UTC