- From: Andrew Somers via GitHub <sysbot+gh@w3.org>
- Date: Wed, 15 Jun 2022 22:24:48 +0000
- To: public-css-archive@w3.org
Thank you Chris, Lea, Fantasi, Adam, et alia @svgeesus @LeaVerou @fantasai @argyleink Thank you for taking the time to discuss this, based on all related timelines for normative changes in this area, I think deferment is the best in the interim. ## Flipper I see the mention of a "black/white flipper" — even that is not always trivial, as the "middle contrast" value is not "middle grey". I have a repo and a CodePen with examples/demos: [Fancy Font Flipping](https://github.com/Myndex/fancyfontflipping) I's suggest the simple solution posed below, BUT flipping at a correct middle contrast would not necessarily pass WCAG 2, as the contrast center for WCAG 2 math is ~18Y (` #767676 `), which is a principal part of that problem. While 18% is a decent middle for large patches of reflected colors, in the context of high spatial frequency stimuli (text) the middle _**contrast**_ is substantially higher. As as result the "flip point" is higher, as we want to flip at middle contrast, which is around 34Y to 42Y. But we also find that there really is not an ideal middle, as the total contrast range of an typical sRGB display is insufficient to have both white and black text at optimum readability contrast for small fonts (like body text) at some middle point (this is assuming the Bailey/Lovie-Kitchin critical contrast and 20x contrast reserve). I.e. at 100Y we have black text, as the bg gets darker, at 42Y or so, small black text starts getting harder to read, but flipping to white isn't much help either. With a 0Y bg, we have white text, but as the bg gets brighter than 34Y ish, we're loosing readability with small text. So in this 34-42Y range, you could kinda have either black or white text, but you'd want to increase the size or weight so that it's large enough for this lowered contrast range. This discussion regards readability *only* which implies luminance only — Also, my statements above are directed toward columns of body text smaller than 18px. At 24px and above you can more or less say "flip point is 37Y". In this discussion I am using luminance Y and not a perceptual lightness measure deliberately: if you rest upon a single point to flip from black or white, there's no need to transit into any other space, just determine the appropriate offset for the relative luminance value, and this is useful enough for a basic pair of colors. It all gets much more tricky when you are doing 3-way and more inputs, and/or adding in hue/chroma considerations, in which case a simple flip point like this would be insufficient. And finally: as monitor peak white levels soar higher, it is desirable to not have full white *anything* for things you're staring directly at. Both backgrounds or text are not well presented at ` #ffffff `... light text might ideally be limited at ` #eeeeee `. ## *AS SUCH:* In the present situation, even a simple B&W flipper would cause conflicts with the existing WCAG 2 guidelines, indicating again the importance of corrections there. And even a simple flipper has "bonus unexpected results" that need consideration. Thank you for reading, Andy -- GitHub Notification of comment by Myndex Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7310#issuecomment-1157010782 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 15 June 2022 22:24:50 UTC