Home / Web Files / Color Contrast Checker
Color Contrast Checker
Body text needs a contrast ratio of at least 4.5 to 1 against its background to pass WCAG 2.2 Level AA. Large text needs 3 to 1.
How the Math Works
Each color is turned into a relative luminance from 0 to 1 using the formula in the guideline. The ratio is the lighter value plus 0.05, divided by the darker value plus 0.05. The tool does not round a ratio up, so 4.49 fails.
How to Fix a Failing Pair
Darken the text or lighten the background and test again. Move one color at a time so the brand color you care about stays put. Check buttons and links as well as body text.
Where the Numbers Come From
- Web Content Accessibility Guidelines 2.2, Success Criterion 1.4.3World Wide Web Consortium. Requires 4.5 to 1 for body text and 3 to 1 for large text at Level AA, and defines the contrast formula.
- Web Content Accessibility Guidelines 2.2, Success Criterion 1.4.6World Wide Web Consortium. Requires 7 to 1 for body text and 4.5 to 1 for large text at Level AAA.
Questions People Ask
What contrast ratio do I need for a button label?
A text label follows the same rule as other text. It needs 4.5 to 1 at Level AA unless it is large text.
Does this work for print colors?
No. The formula is written for colors on a screen. Printed contrast depends on the ink and the paper.
The Short Version
- Large text means at least 18 point, or 14 point bold.
- Level AAA asks for 7 to 1 on body text and 4.5 to 1 on large text.
- The ratio runs from 1 to 1 for two equal colors up to 21 to 1 for black on white.