Re: [csswg-drafts] [mediaqueries-5] Media query to prefer shapes over colours (#7406)

From an earlier comment from @lukewarlow:

> To add to the macOS [differentiate w/o color] setting. Both Android and Windows have some form of colour blindness colour filtering settings. While not a direct match to prefer shapes over colours these are probably pretty good indications that can be used to match this media query should it be implemented.

Of note Mac and iOS have condition-specific color filters too, and these are separate from the "differentiate w/o color" setting. The filters shoft problem areas of the color spectrum into less problematic colors... e.g. for someone with deuteranopia, a certain form of red/green color blindness, the reds become more pink, and the greens become more yellow, making the difference between UI controls colored red (now pinkish red) and green (now yellow-green) more perceivable.

There is no API to detect this setting, because developers changing the colors based on the value of the setting could cause additional user confusion. However, many video game developers offer various color schemes that avoid problematic ranges.

In contrast, the "differentiate without color" setting is available as a developer opt-in. This is a better solution when available, especially for those with any form of achromatopsia, as filters are a better solution for color deficiency than for true color blindness.

> Come to think of it multiple platforms have a greyscale mode too which should probably match this media query too.

I recall WebKit may have implemented a long time ago, but it is not working currently. My suspicion is that it regressed when grayscale (previously a standalone feature) was rolled into the newer color filters... Note: color filters is probably 10 years old at this point, not "new." 

```js
window.matchMedia("(monochrome)").matches
```

Seems like this could match for either the grayscale color filter, monochrome print styles, or the "differentiate without color" setting applied.

Obligatory caveat that WebKit support of new media features is subject to these ongoing privacy discussions.
- https://github.com/WebKit/standards-positions/issues/145#issuecomment-1743869173
- https://github.com/web-platform-tests/interop/issues/515



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


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

Received on Monday, 29 April 2024 22:59:43 UTC