CSS contrast-color() Function
Choosing readable white or black text for any background colour with CSS `contrast-color()`, its limits and fallbacks.
Content tagged contrast-color
Tutorial:
contrast-color(): Automatic Readable Text on Any BackgroundLet CSS choose readable white or black text automatically.Use CSS contrast-color() to pick white or black text for any background colour: how the spec defines it, custom properties and brand colours, buttons and tags, pairing with light-dark(), mid-tone limits, and an @supports fallback.