Cant someone take a look at the buttons before the large project ships? Alternatively make it mandatory to never have black text on a dark button and tell every team member including the large ones.
Interesting to read about the perceptual contrast vs mathematical - I did not know that. Going to integrate that into my workflow.
> APCA says you don't need as much contrast
You can always specify the threshold if you want, e.g. "apcaContrast(color)) >= $targetContrast" after adjusting, depending on what you want to do.
It really is easy, just make sure you have enough color space.
re: just change APCA contrast target, that's separate from the Not Even Wrong stuff in the article. I didn't mean to imply APCA is wrong to say you need less contrast, but rather, that the article is wrong to conclude white has more contrast.
- Their work does ensure contrast.
- The white on blue clearly has less contrast, not more. (squinting is a cheap way to test, or, walking backwards from your monitor)
With APCA, backgrounds around L* 60 tend to still allow white foregrounds, which is aesthetically closer to what the eye wants.
A black foreground would have more contrast regardless, even by APCA.
To be fair, this is how APCA is almost always demonstrated as a win over the long-running standard, so people run with the premise that the demo image of APCA is more contrast, rather than "ours say you'll have enough contrast to be accessible with a white foreground, even if it also says the contrast would be higher with a black foreground".
(source: in 2020 built color system around the same science, enabling latest iterations of Material theming)
> in 2020 built color system around the same science, enabling latest iterations of Material theming
No wonder everything Google builds, including Material, always has issues with contrast.
--text: lch(from var(--bg) calc((49.44 - l) * infinity) 0 0);
source: https://til.jakelazaroff.com/css/swap-between-black-and-whit...Consistent, it is not. Ex. we can imagine a background at L* 50 that is ~equally served with a white or black foreground - in that case, the aesthetic principles come into play.
To also disambiguate that, and get to 100% reliable, if both a darker and lighter color are available given contrast K and background color C, look at C, if it's L* is >= 60, choose lighter.
Then, it is 100% correct and consistent.
The article says the standard specifies the calculation to use.
"Color Wheel: The Basic Color Theory for Artists and Designers" https://dessign.net/color-wheel-theory/
https://youtu.be/tUJvE4xfTgo?si=vFlegFA_7lzijfSR (warning: video is in Portuguese)
crtasm•2h ago
judah•1h ago
miiiiiike•1h ago
homebrewer•1h ago
> Support for this feature first shipped in March 2021, in Safari Technology Preview 122.
https://webkit.org/blog/11577/release-notes-for-safari-techn...
> Added experimental support for CSS Color 5 color-contrast()
https://trac.webkit.org/changeset/273683/webkit/
ctippett•1h ago