How to check color contrast
- Set the text and background. Type HEX/RGB values, choose the browser color inputs or use a sample pair.
- Read the ratio. Identical colors produce 1:1; black and white produce 21:1. Normal text and large text have different WCAG thresholds.
- Try a correction. Choose to adjust text or background; check the newly calculated ratio, then undo if needed. Copy CSS once you are happy with the actual pair.
WCAG 2.2 AA and AAA contrast requirements
| Content | AA | AAA |
|---|---|---|
| Normal text | At least 4.5:1 | At least 7:1 |
| Large text | At least 3:1 | At least 4.5:1 |
| Essential UI boundaries and non-text graphics (where 1.4.11 applies) | At least 3:1 | No separate AAA requirement |
For WCAG contrast testing, “large text” generally means at least 18pt (24 CSS px), or 14pt (about 18.7 CSS px) in bold. Contrast alone cannot establish whether a control or page is fully accessible.
Example: #999999 text on white does not reach AA for normal text. Black on white is 21:1. A colorful button may also need separate contrast checks for its label and its boundary.
When to test your actual interface
This checker compares two opaque sRGB colors. It does not composite transparent layers, inspect pictures or gradients, detect the true background behind text, or audit focus indicators and interaction states. Check hover, focus, error, selected and disabled states in the real layout. Read the official WCAG text contrast guidance and non-text contrast guidance.
To choose new colors, try Color Picker, Color Wheel or color palettes. The Color Converter helps you obtain HEX and RGB values.