Re: [csswg-drafts] [mediaqueries-5] prefers-contrast: infer contrast preference from forced colors (#5224)

> For now, we're leaving it up to the individual UA to figure out what is high or low contrast. I think we should continue doing that for quite some time, but possibly we could have an informative link to the kind of contrast logic you've mentioned, to help engineers working on this look up the right references. What would be a good resource to point to?

Hi @frivoal 

There is a technology demonstrator which includes a "Research Mode" with interactive experiments. This demonstrates the APCA (Advanced Perceptual Contrast Algorithm) which predicts perceived suprathreshold contrast of text against a solid background for self-illuminated displays:     
https://www.myndex.com/SAPC/

There is also a simplified version of the tool, which only indicates the "ideal minimum" contrast, intended for guidance for web designers:    
https://www.myndex.com/APCA/

And the GitHub repository which has additional information and links to resources:     
https://github.com/Myndex/SAPC-APCA

And I am happy to answer any questions regarding the method or implementation.

## But wait there's more

One of the things that became very apparent over the last two years of research is that contrast is not as simple as the difference between two colors. There are any other important aspects to consider especially spacial frequency, which for our purposes means the weight and size of the font, and the spacing of letters and lines. But also padding, overall page luminance, ambient, etc etc all play a roll.

Luminance contrast is most important for readability, not chroma/hue contrast, except that some hue/saturation combinations  can interfere with readability.

Importantly, some people need a lower contrast just as some people need a higher contrast. Those that need a lower contrast is most associated with low spatial frequencies (i.e. large bold letters or lines) those that need a higher contrast is especially noticeable in high spatial frequencies (small and thin fonts).

The APCA uses lookup tables to assist in taking factors like this into account, so small thin fonts need a substantially higher contrast than large bold fonts.

### Implication
I mention this because the implication is that someone that wants a lower contrast more than likely wants the contrast of big/bold lowered more than the contrast of small/thin (and may not want small/thin lowered at all). Meanwhile someone that wants higher contrast probably wants small.thin raised more than that for big/bold.

### RELATED
Similarly, someone that needs text increased in size to read does not want all text increased by a single percentage, but wants the smallest text increased to their minimum critical size, and the larger text on the page only increased enough to be larger, but not increased by the same percentage. I.e. if you have a 16px font and a 28px font, and someone with poor acuity needs a minimum of 32px, then increase the 16px to 200% (to 32px), but don't increase the 28px font to 200%, (56px) instead only increase it to 150%, or 42px.

## TL;DR
I.e. neither contrast changes nor zoom factors apply equally to all the content on a page, but have significant and non-trivial requirements for relative and context sensitive adjustments to accommodate the needs of each individual user.

Andy

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


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

Received on Thursday, 3 June 2021 17:54:31 UTC