WCAG Contrast Checker
Check the WCAG contrast ratio between a text colour and a background colour, with pass or fail for AA and AAA at normal and large text sizes.
The quick brown fox jumps over the lazy dog.
About WCAG Contrast Checker
The Contrast Checker tells you whether your text colour stands out enough from its background, with the WCAG contrast ratio and pass or fail for AA and AAA at normal and large sizes.
Example
Blue #0000ff on yellow #ffff00 is 8.00 : 1 and passes every check.
The targets
AA needs 4.5 : 1 for normal text and 3 : 1 for large text. AAA needs 7 : 1 and 4.5 : 1.
Large text
At least 18 pt (about 24 px), or 14 pt (about 18.7 px) bold.
Why it matters
Low contrast is hard to read for people with low vision, older readers and anyone on a phone in sunlight. AA is the common target in accessibility rules.
Good to know
One text colour against one solid background; text on photos and gradients needs a manual check.
Many pairs?
Use the Batch Contrast Checker.
Private
Everything runs in your browser. Nothing you type is uploaded.
How to use WCAG Contrast Checker
- Choose the text colour with the first colour picker.
- Choose the background colour with the second colour picker.
- Read the contrast ratio and look at the sample text.
- Check the four pass or fail results and change a colour until the level you need passes.
Related guide: WCAG Colour Contrast: How to Check Your Design
Help & FAQ
What is a contrast ratio?
It is a number from 1 : 1 to 21 : 1 that compares the brightness of two colours. A higher number means the text stands out more.
What ratio do we need for normal text?
WCAG level AA asks for at least 4.5 : 1, and level AAA asks for at least 7 : 1.
What ratio do we need for large text?
AA asks for at least 3 : 1 and AAA asks for at least 4.5 : 1.
What counts as large text?
At least 18 point (about 24 pixels), or at least 14 point (about 18.66 pixels) in bold.
Which colours did you test?
Dark gray #1f2937 on white gave 14.68 : 1, black on white 21.00 : 1, #777777 on white 4.48 : 1 and #767676 on white 4.54 : 1, all matching our own calculation.
Why does #777777 fail but #767676 pass?
Their ratios on white are 4.48 and 4.54. The AA limit for normal text is 4.5, so the first is just below it and the second just above it.
Can a colour pass AA for large text but fail for normal text?
Yes. Red #e53935 on white gave 4.23 : 1, which passes the 3 : 1 limit for large text but not 4.5 : 1.
Does it check text over a photo or a gradient?
No. It compares two solid colours. Check each part of the background separately for images or gradients.
Does it handle transparent colours?
No. Use the final blended colour you see on screen.
Does it check buttons, icons and input borders?
Not separately. WCAG asks for 3 : 1 for such interface parts, so enter the two colours and read the ratio yourself.
Is a pass enough for accessibility?
No. Contrast is one factor. Text size, font weight, spacing and the reader's screen and eyesight also matter.
Are our colours sent anywhere?
No. The check runs in your browser. In a test, only the site's small analytics calls were made.