contrast-color() in CSS
Summary
Let the browser choose a contrasting text color with contrast-color() instead of hard-coding the pair.
For now it returns only black or white, chosen with the WCAG 2 formula, so treat it as a safety net.
- Resource: contrast-color() in CSS
- By: WebKit
- Kind: writing (article)
- Level: intermediate
- Tags: accessibility, design-systems, developer, reference, css