Re: [csswg-drafts] contrast-ratio() (#7730)

The CSS Working Group just discussed `Contrast Ratio`.

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> Subtopic: Contrast Ratio<br>
&lt;chris> github: https://github.com/w3c/csswg-drafts/issues/7730<br>
&lt;fantasai> matatk: not proposing to resolve all issues right now<br>
&lt;fantasai> ... wanted to use our F2F time to get background<br>
&lt;fantasai> ... what's the use case for this function?<br>
&lt;Rossen_> ack chris<br>
&lt;fantasai> chris: Dropped link to the issue<br>
&lt;fantasai> ... where I gave an introduction to what we want to do here<br>
&lt;fantasai> ... if you just have a single stylesheet, no variables, just light mode, don't need anything special<br>
&lt;fantasai> ... everything is constant<br>
&lt;fantasai> ... but if you have theming and customization, and stylesheets merged from multiple teams<br>
&lt;fantasai> ... it will work out for you<br>
&lt;fantasai> ... previously, this was all done by eye<br>
&lt;fantasai> ... they chose contrast by eye, threw through a checker to be sure<br>
&lt;argyle> also, user's bring preferences to the page: prefers-contrast (less, more, etc)<br>
&lt;fantasai> ... here, not necessarily have human intervention<br>
&lt;fantasai> ... but need to know that it will check out<br>
&lt;fantasai> matatk: I thought you as the author still have to give colors to choose from and isn't that deterministic<br>
&lt;fantasai> ... but you said it would be from variables<br>
&lt;fantasai> ... wouldn't you still have to know which custom properties would be applicable?<br>
&lt;fantasai> chris: yes, and the list that you give is in priority order<br>
&lt;fantasai> ... also one of the open issues is allowing that list to be empty<br>
&lt;fantasai> ... and if empty, it gives you a color: either white or black, whichever more contrasty<br>
&lt;iank_> note - something these lists colors are generated from a user provided image for example.<br>
&lt;fantasai> ... but if you want to pick a target contrast, then willl look for that<br>
&lt;fantasai> chris: other big issue open atm is WCAG2 has a contrast algorithm which gives a lot of false positives and false negatives<br>
&lt;fantasai> ... and we want to do btter<br>
&lt;fantasai> ... I've implemented a bunch of contrast algos in JS so ppl can play with it<br>
&lt;chris> https://colorjs.io/docs/contrast.html<br>
&lt;fantasai> matatk: As side project, I had to write a functio nthat gives white or black from bgcolor<br>
&lt;fantasai> ... so that's very helpful<br>
&lt;fantasai> ... we'll follow the discussions and offer what advice we can<br>
&lt;fantasai> janina: WCAG's color contrast rule is problematic in many ways<br>
&lt;fantasai> ... including that some ppl don't do well with very high contrast, as you noted<br>
&lt;fantasai> chris: It used to point to obsolete draft of sRGB, now it's updated<br>
&lt;fantasai> janina: Plan to be smarter in 3, but quite a ways out, so time to get it smarter<br>
&lt;fantasai> ... would be willing cooperators in that<br>
&lt;Rossen_> q?<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7730#issuecomment-1248414495 using your GitHub account


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

Received on Thursday, 15 September 2022 17:45:35 UTC