Color contrast checker
CSS
Contrast 5.90:1. Passes AA for all text; fails AAA for normal text.
| Check | Needs | Result |
|---|---|---|
| Normal text, AA | 4.5:1 | Pass |
| Large text, AA | 3:1 | Pass |
| Normal text, AAA | 7:1 | Fail |
| Large text, AAA | 4.5:1 | Pass |
| Icons and controls, AA | 3:1 | Pass |
color: #5B6573; background-color: #FFFFFF; /* Contrast 5.90:1. Passes AA for all text; fails AAA for normal text. */
- Note: For AAA with normal text, #515966 reaches 7.06:1 on this background.
- Note: WCAG does not round: 4.49:1 fails 4.5:1, so the ratio here is cut off, never rounded up. Thin or unusual fonts can need more contrast than the ratio suggests.
How to use it · free, no signup
How to use the Color Contrast Checker
Enter a text colour and a background colour to see their contrast ratio, whether they pass WCAG AA and AAA, and the nearest shade that would pass. Runs in your browser.
01
Enter the text colour
As hex, such as #5B6573, or rgb(91, 101, 115). Transparency is blended over the background.
02
Enter the background
The solid colour behind the text.
03
Read the checks
Pass or fail for each size and level, and the nearest colour that passes if it fails.
The ratio and what it must reach
WCAG measures contrast as a ratio from 1:1, the same colour twice, to 21:1, black on white. It is worked out from each colour’s relative luminance, how bright it looks once the red, green and blue channels are weighted for the eye. The thresholds are set by three success criteria (W3C: Understanding Contrast (Minimum)):
| Content | AA | AAA |
|---|---|---|
| Normal text | 4.5:1 | 7:1 |
| Large text: 24px, or 18.5px bold | 3:1 | 4.5:1 |
| Icons, borders of controls, chart lines | 3:1 | - |
The starting colours, #5B6573 on white, reach 5.90:1: enough for AA at any size, short of AAA for normal text. The tool suggests #515966, which reaches 7.06:1.
No rounding, and no shortcuts
The ratio is compared exactly: 4.49:1 fails 4.5:1, so this page cuts the figure off rather than rounding it up. Two other points catch people out. Transparent text is drawn blended with whatever is behind it, so a 50% black on white is measured as the grey you see, about 4:1. And thin or unusual fonts can need more contrast than the ratio suggests, because the thresholds assume ordinary letterforms.
Fixing a colour that fails
- Darken or lighten the text, not the brand colour itself: the tool finds the nearest shade that passes, keeping the hue.
- Use the brand colour for large type or for shapes, where 3:1 is enough, and a darker shade for body text.
- Check every state, such as hover, focus and disabled-looking but active buttons, not only the default.
- Check text on images against the lightest part of the image behind it.
Beyond colour
Contrast is one part of a page people can read. The readability checker looks at the words, the heading structure checker at how the page is organised for screen readers, and the image alt text checker at what images say to people who cannot see them.
Published by Koit Academy. Who runs it, how it is paid and how its tools are checked.
Questions
What people ask about the Color Contrast Checker
What contrast ratio does WCAG require?
What counts as large text?
Is 4.48:1 close enough to pass?
How is the contrast ratio calculated?
Do logos need to meet contrast requirements?
Related tools
Heading Structure Checker
A page’s H1 to H6 headings as an outline
Open itImage Alt Text Checker
Every image’s alt text, and what is missing
Open itSERP Preview Tool
See where a title and description will be cut
Open itMeta Tag Generator
Title, description, canonical and sharing tags in one block
Open itRobots.txt Generator
A clean robots.txt from the paths you want blocked
Open itRobots.txt Tester
Which rule allows or blocks a URL, and why
Open it