WCAG Contrast Checker: Test Text and Background Colors
Check the WCAG contrast ratio of any colour pair. Failing pairs get a passing suggestion.
Loading tool…
How to use the WCAG Contrast Checker
- Enter or pick the text colour and the background colour.
- Read the contrast ratio and the AA and AAA results for normal and large text.
- If a level fails, use the suggested text colour, or change the background.
About this tool
WCAG, the Web Content Accessibility Guidelines, sets minimum contrast so text is readable for people with low vision or colour deficiency, and for anyone on a phone in sunlight. The ratio compares the relative luminance of two colours and ranges from 1:1 (identical) to 21:1 (black on white).
Level AA needs at least 4.5:1 for normal text and 3:1 for large text, meaning 18pt (24px) or 14pt (about 18.7px) bold. Level AAA needs 7:1 for normal text and 4.5:1 for large text. Interface parts such as input borders and icons need 3:1 under AA. Most legal accessibility requirements point to AA.
The suggestion keeps your text colour's hue and saturation and moves only its lightness until the target ratio is met. Pure contrast is only one part of accessibility. Font size, weight and not relying on colour alone also matter. Transparent colours are not handled: blend a semi-transparent colour with its background first and test the result. This tool follows WCAG 2.x, not the draft APCA method of WCAG 3.
Frequently asked questions
What contrast ratio do I need?
At least 4.5:1 for normal text and 3:1 for large text to meet WCAG AA. For AAA it is 7:1 and 4.5:1.
What counts as large text?
Text of 18pt (24px) or larger, or 14pt (about 18.7px) or larger if bold.
Does the ratio apply to logos?
No. Logos and purely decorative elements are exempt from the contrast requirement.
Why does a colour that looks fine fail?
Perception is subjective and screens vary. The ratio is a measurable minimum that works across devices and for different vision.
Need a custom tool or website?
IDM Valley builds web apps, calculators, AI chatbots and automation for businesses. Fixed prices, code in your name.









