Why color contrast matters
Text with low contrast against its background is hard to read for many people, including those with low vision. The WCAG (Web Content Accessibility Guidelines) define minimum contrast ratios to ensure readability.
Criteria used
AA (minimum recommended): 4.5:1 for normal text, 3:1 for large text (18pt and up, or 14pt bold). AAA (stricter level): 7:1 for normal text, 4.5:1 for large text.
Reading a contrast ratio in practice
The ratio runs from 1:1 (identical colors) to 21:1 (black on white). A well-known borderline case: gray #767676 on white gives about 4.54:1 and passes AA for normal text, while #777777 drops to about 4.48:1 and fails. That is why checking the exact number beats judging by eye.
What the ratio does not measure
- Very thin or tiny typefaces can still be tiring to read even when the ratio passes.
- Input borders, icons and other interface components have their own 3:1 threshold in WCAG 2.1.
- Semi-transparent text should be tested after blending with the background, using the final resulting color.
- Over a photo or gradient, test the lightest or most difficult spot behind the text, not the average.
- Hover, focus and disabled states are separate color pairs, so check each one, not only the default state.
Frequently asked questions
Which level should I follow, AA or AAA?
AA is the minimum standard required by most accessibility regulations; AAA is stricter and recommended for essential content.
Does the contrast ratio change depending on font size?
The contrast ratio calculation itself doesn't change — what changes is the minimum required threshold: large text (18pt and up, or 14pt bold) has a lower threshold because it's naturally easier to read.