WCAG contrast targets, color tokens, dark mode, and how to make links identifiable without relying on colour alone.
Color and contrast
Body text must meet contrast expectations against its background. WCAG 2.x commonly cites 4.5:1 for normal text and 3:1 for large text (roughly 18px+ regular or 14px+ bold). Interactive components and focus indicators also need visible contrast - see WCAG 2.2. Back to the section overview.
Text and UI colors
Do (tokens with readable defaults)
Don't (light gray body text on white)
Dark mode
When you offer dark mode, redefine tokens and re-check contrast. Pure white on pure black can create halation for some readers - slightly off-white text on dark gray often reads better.
Do
Don't
Links in body copy
Relying on colour alone fails WCAG 1.4.1 Use of Color. Underline links in running text or give another non-colour cue.
Do
Don't
Related
- Readability and typography - type sizing and measure that work alongside colour choices.
- CSS: Colors and Typography - the underlying CSS reference for fonts, units, and color.