12357 shaares
290 private links
290 private links
Maybe useful for later, but I see some advantages.
wcag2(aa) seems to be a good and self explanatory function.
It has limitations though:
- it doesn't guarantee perceptual or AAA compliance
- transition snaps because
contrast-colorreturns a discrete value and - tie goes to white
- gradients and images are out
- transparent colors are composited first
- windows high contrast mode takes over. It is defined in https://www.w3.org/TR/css-color-adjust-1/#forced-colors-mode
The generated colors can be combined with other color functions.
I am still concerned more and more computation will be put on simple webpages.