Contrast checker
Check the contrast between a text color and its background against WCAG 2.2, free and in your browser. The contrast checker shows the ratio and which levels pass, and when one fails it suggests the nearest text color that passes. Nothing is sent anywhere.
How to check color contrast for WCAG
- 1Type or pick a "Text color"
- 2Type or pick a "Background color"
- 3Read the ratio and the "Pass" or "Fail" for each use
- 4If a level fails, copy the suggested text color
- The contrast ratio, with AA and AAA checked for every use
How the check works
- Rounded down.A ratio of 4.499 shows as 4.49:1, so a 4.5:1 on screen really passes AA
- A live sample.Large text at 24 px and body text at 16 px appear in your two colors as you type
- Nothing is sent anywhere.Both colors are checked by your browser, on your own device
What you can do
- Type a color as #hex, rgb(), hsl(), hwb(), lab(), lch(), oklch(), a CSS color name or a Tailwind name such as sky-500, or choose it with the color picker
- See the result for five uses: body text at AA (4.5:1) and AAA (7:1), large text at AA (3:1) and AAA (4.5:1), and icons, borders and form fields at AA (3:1)
- Get the nearest text color that reaches AA or AAA for body text. It keeps the hue of your color and only gets lighter or darker, and you can copy it
- Turn the check around with "Swap", so the text color becomes the background
Good to know
- Transparency is not taken into account. A color with an alpha value is checked as if it were fully opaque
- Each color is first rounded to its HEX value, the color a screen really shows, and then compared
- Large text means 24 px, or 18.66 px in bold. Smaller text has to meet the body text levels
- If no lighter or darker version of the text color reaches a level on that background, the tool says so instead of suggesting one
Questions
What contrast ratio does WCAG require?
For body text, AA asks for 4.5:1 and AAA for 7:1. Large text needs 3:1 for AA and 4.5:1 for AAA. Icons, borders and form fields need 3:1.
Is #777777 on white enough for WCAG AA?
No. #777777 on white gives 4.47:1, just under 4.5:1. One step darker, #767676 gives 4.54:1 and passes AA for body text.
Why does the contrast checker round down?
WCAG compares the exact ratio, so 4.499:1 fails AA. Rounded the usual way it would show as 4.5:1 and look like a pass. Rounded down, what passes on screen also passes the rule.
How does the suggested color work?
The tool opens with #5B6770 on white: 5.8:1, a pass for AA body text but not for AAA. For AAA it suggests #4F5A63 at 7.05:1, the same hue a little darker.
Are my colors sent to a server?
No. The contrast is worked out by your browser on your own device. No request is made with your colors.
More tools in Web & code
That page doesn't exist. Search or drop a file below to find the tool you need.
One site for every file job. What’s yours?
Stop hopping between converter sites. Pick from 410+ tools, or a recipe that chains several.
- Files Stay On Your Device
- No watermark
- Works offline
Drop a file here
A pasted file works too.
or search for a tool
Open an app
From “ugh, this file” to done, in three steps.
- Drop it, or pick a task
No file? Search for what you need. Files are processed on your device, not uploaded for processing.
- Pick what you want
Smaller, another format, signed, merged. One click, no settings to study first.
- Make it a recipe
Need three steps in a row every week? Chain them once and run the same recipe next time.
One approved toolbox for the whole team.
In offices, on building sites and in agencies, teams handle sensitive files all day. ToolRecipe gives everyone the same tools and the same recipes, and the files are processed on each person's own computer.
- Files are processed on the employee's device
- Company recipes everyone runs the same way
- One place instead of ten converter sites