WCAG Colour Contrast
Web Content Accessibility Guidelines contrast ratios, AA and AAA thresholds, and checking text colours against them.
Content tagged wcag
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.