Open davidscotson opened 3 years ago
Hello, I'm the inventor of the new contrast method for WCAG 3, APCA (Advanced Perceptual Contrast Algorithm) I just saw this post and wanted to chime in.
If you have software that flips the text from black to white, based on a particular background color, I have a repo here that discusses this use case specifically:
https://github.com/Myndex/fancyfontflipping
And here's a CodePen demo https://codepen.io/myndex/pen/GRyxrrm
2.The point of mid contrast is also not enough for either black or white text, unless the font is large and bold enough. The code linked above increases font size through the midrange.
Thank you,
Andy
The current code uses as algoritm to calculate whether foreground text in black or white is better for a background of the highlighted color.
There's a newer algorithm for this being developed wy the W3C for the new WCAG3 accessability standards, and it seems much more accurate. They have a js version on their github:
https://github.com/Myndex/SAPC-APCA/tree/master/JS