About the Accessibility Checker
Accessibility Checker focuses on one of the most important and most frequently failed parts of accessible design: whether text stands out enough from its background. Choose two colors and it reports their WCAG contrast ratio and whether the pair passes the AA and AAA levels, with a live sample so you can see the result.
How it works
The checker converts both colors to relative luminance, a measure of perceived brightness defined in WCAG, by linearizing each sRGB channel and weighting red, green and blue at 21%, 72% and 7%. It then divides the lighter luminance plus 0.05 by the darker luminance plus 0.05 to get the contrast ratio.
That ratio is compared with the WCAG 2 thresholds: AA needs 4.5:1 for normal text and 3:1 for large text, AAA needs 7:1 and 4.5:1, and non-text elements such as icons and input borders need 3:1. The ratio is truncated, not rounded, so 4.499 is never shown as passing. When a level fails, the tool finds the closest passing colors by changing only the lightness of the text or background color.
How to use
- 1
Pick or type the text color (hex, rgb() or hsl()).
- 2
Pick or type the background color, or click the swap button to reverse them.
- 3
Check the ratio and the preview of large, normal and small text, a button and a link.
- 4
Read the five pass or fail tiles, and click a suggested color to fix a failing pair.
Worked examples
Meeting AAA with dark gray
A documentation site wants body text that passes AAA.
#595959 is about the lightest neutral gray that still reaches 7:1 on white.
Red error message
A form shows error text in pure red on white.
Pure red is too light for small error text; a deeper red such as #CC0000 is a safer choice.
Gold on white
A brand wants gold #FFD700 headlines on a white page.
Bright yellows have very high luminance, so they almost never work as text on white. Use them as backgrounds behind dark text instead.
Frequently asked questions
Why does color accessibility matter for a website?+
Poor contrast can make text hard or impossible to read for people with low vision or color blindness, and harder for everyone on a bright or low-quality screen.
Does this replace a full accessibility audit?+
No. It checks color contrast only. A full audit also covers keyboard access, screen reader support, alternative text, focus states and semantic HTML.
Which WCAG level should I aim for?+
Level AA is the common legal and policy target, which means 4.5:1 for normal text and 3:1 for large text. AAA is a stricter, optional goal.
Is this the same as the Contrast Checker?+
It uses the same WCAG contrast calculation and results. This page simply frames it around accessibility compliance.
Do icons and buttons need to meet contrast rules too?+
WCAG 2.1 asks for at least 3:1 for meaningful icons, input borders and other interface parts against adjacent colors. The UI & graphics tile checks exactly that threshold.