What the Contrast Checker does
The Contrast Checker measures how readable text is on a background using the WCAG 2.2 contrast ratio, from 1 : 1 (no contrast) to 21 : 1 (black on white). It shows pass or fail for normal text, large text and icons at the AA and AAA levels, previews your colours with sample text, and suggests the closest text colour that passes when yours does not: the same hue, only lighter or darker.
How to use it
- Enter the text colour and the background colour in any CSS format.
- Read the ratio and the five pass or fail marks.
- If it fails, press Use beside a suggested colour.
- Type your own sample text to preview it.
Example
Slate grey #64748B on white is 4.76 : 1, which passes AA for all text but not AAA. The lighter #9CA3AF on white is only 2.54 : 1 and fails even for large text. The tool suggests #707682 (4.56 : 1) to pass AA and #525863 (7.16 : 1) to pass AAA, both the same cool grey, just darker.
What the levels mean
AA is the level most laws and policies ask for: 4.5 : 1 for normal text and 3 : 1 for large text, meaning at least 24 px, or 18.66 px in bold. AAA asks for 7 : 1 and 4.5 : 1. Icons, input borders and focus rings need 3 : 1 against what is next to them.
Contrast is not the only thing that makes text readable: font size, weight and line spacing matter too. But low contrast is the most common accessibility problem on the web, and it affects everyone reading a phone in sunlight.
Questions people ask
Is anything uploaded?
No. Everything is worked out in your browser, so your colours, designs and images stay on your device.
How are see-through colours judged?
A transparent background is placed over white first, and transparent text over the background, then the ratio is measured.
Does it use APCA?
No. It uses the WCAG 2.2 ratio, which is the current standard that laws and audits refer to.
Why does the suggestion keep my hue?
Changing only lightness keeps the colour recognisably yours while making it readable.