WebAIM Contrast Checker
Quick online tool. Enter two colors, get instant pass/fail.
Learn how to choose colors that everyone can see, including people with low vision and color blindness.
Reading time: 8 minutes
Color contrast affectseveryone'sability to read and interact with content:
Good contrast isn't just accessible—it's better design for everyone.
The Web Content Accessibility Guidelines specify minimum contrast ratios:
| Element Type | Minimum Ratio | WCAG Criterion |
|---|---|---|
| Normal text (under 18pt / 24px) | 4.5:1 | 1.4.3 Contrast (Minimum) |
| Large text (18pt+ or 14pt bold) | 3:1 | 1.4.3 Contrast (Minimum) |
| UI components & graphics | 3:1 | 1.4.11 Non-text Contrast |
| Enhanced Level AAA | 7:1 / 4.5:1 | 1.4.6 Contrast (Enhanced) |
Quick online tool. Enter two colors, get instant pass/fail.
Desktop app with eyedropper. Test colors directly from your screen.
Browser extension that scans entire pages for contrast issues.
Check contrast while designing, before development.
Gray text on white backgrounds is the most common failure.
color: #999999;
background: #ffffff;
This gray text fails contrast requirements.
color: #767676;
background: #ffffff;
This gray text passes for normal text.
Most browser defaults for placeholder text fail contrast.
::placeholder {
color: #aaaaaa;
}
::placeholder {
color: #767676;
}
When your brand colors don't meet contrast requirements:
Custom focus styles must have 3:1 contrast against adjacent colors.
/* Good focus indicator */
:focus {
outline: 3px solid #005EA2;
outline-offset: 2px;
}
/* High contrast focus ring */
:focus-visible {
outline: 2px solid #000000;
box-shadow: 0 0 0 4px #ffffff, 0 0 0 6px #000000;
}
Contrast ratios help withlightnessperception, but don't solve color blindness. Additional steps:
Print your design in grayscale. Can you still understand all the information? If not, you're relying too heavily on color.