What Is a Color Contrast Checker?
A color contrast checker measures the contrast ratio between two colors to determine if text will be readable against its background. This is essential for meeting WCAG (Web Content Accessibility Guidelines) — the international standard for web accessibility. Poor contrast makes content unreadable for millions of users with low vision or color deficiencies.
This tool calculates the contrast ratio in real time, tells you whether your color combination passes WCAG AA and AAA standards for both normal and large text, and lets you fine-tune colors until they meet accessibility requirements.
WCAG Contrast Requirements
| Level | Normal Text | Large Text |
|---|---|---|
| AA (minimum) | 4.5 : 1 | 3 : 1 |
| AAA (enhanced) | 7 : 1 | 4.5 : 1 |
Tips for Accessible Color Choices
- → Don't rely on color alone. Always pair color with text labels, icons, or patterns so color-blind users can distinguish elements.
- → Test both themes. If your site has light and dark modes, check contrast in both. Colors that pass on white may fail on dark backgrounds.
- → Use our Color Blindness Simulator to see how your palette looks to users with different types of color vision deficiency.
How to Use This Contrast Checker
- Enter your foreground color — Paste the hex code or pick the text color you're using.
- Enter your background color — Paste the hex code or pick the background color behind the text.
- Read the contrast ratio — The tool calculates the WCAG contrast ratio and shows whether your combination passes AA and AAA standards for both normal and large text.
- Adjust until you pass — If your colors fail, adjust the lightness of either color until the ratio meets your target level.
Worked example: what the fix suggestions actually change
When a pair misses the target you choose, the tool steps the text or background lightness in HSL, one point at a time, keeping hue and saturation, and offers the first colour that reaches it. On October 13, 2026 we ran the page's own functions in Chromium on five pairs, at the plain AA target (4.5:1) and at the new 4.6:1 "with margin" target.
| Pair (exact ratio) | Old display | Display now | Suggestion at 4.5:1 | At 4.6:1 (with margin) |
|---|---|---|---|---|
| #FF3366 on white (3.549) | 3.5 | 3.54 | darker text #EB003B → 4.56 | darker text #E60039 → 4.74 |
| #777777 on white (4.478) | 4.5 (next to FAIL) | 4.47 | darker text #757575 → 4.60 | darker text #757575 → 4.60 |
| white on #3B82F6 (3.678) | 3.7 | 3.67 | darker bg #1A6EF4 → 4.58 | darker bg #156BF4 → 4.72 |
| #28C840 on white (2.228) | 2.2 | 2.22 | darker text #1B882B → 4.56; darker bg #424242 → 4.51 | darker text #1A842A → 4.79; darker bg #404040 → 4.65 |
| Default #6B4EFF on #F5F0FF (4.518) | 4.5 | 4.51 | none (passes by 0.018) | darker text #6647FF → 4.80; lighter bg #F8F5FF → 4.68 |
- Suggestions stop at the first value that reaches the target. At 4.5:1 that lands just above the line (4.51–4.60 here), where a later tweak, another screen or antialiasing on thin fonts can drop it back under. Pick a "with margin" target (3.1, 4.6 or 7.1) to get a little headroom; at 4.6:1 the suggestions above came out at 4.60–4.79.
- The ratio is shown to 2 decimals, cut off rather than rounded. WCAG does not round: #777777 on white is 4.478:1 and fails. The old display rounded it to "4.5" next to a FAIL; it now reads 4.47, so the number and the grade agree.
- Darkening a saturated colour in HSL changes its character. #FF3366 needs HSL lightness 46 to pass on white, which is the deeper #EB003B. Hue is kept, so it stays the same family; if the brand colour must not change, use it for large text (3:1, which #FF3366 meets at 3.55) or as a background behind white text instead.
- The UI card is pass or fail at 3:1. Icons, input borders and focus indicators fall under SC 1.4.11, which asks for 3:1 at Level AA and has no AAA level; the card used to borrow the large-text grades and could say "AAA". It now says AA (3:1 or more) or FAIL.
- Copy CSS gives color and background-color for the current pair; Swap exchanges them, and the ratio is the same either way.
Sources
Checked on .
- W3C WCAG 2.2: Success Criterion 1.4.3 Contrast (Minimum)
- W3C Understanding SC 1.4.3 (the 4.5:1 threshold is not rounded)
- W3C WCAG 2.2: Success Criterion 1.4.11 Non-text Contrast (3:1, Level AA only)
- W3C WCAG 2.2: definition of large scale text (18 pt, or 14 pt bold)
- W3C WCAG 2.2: relative luminance (0.04045 threshold)
Related tools
- Contrast measures legibility; perceptual difference measures consistency. For QA against brand drift use the Perceptual Color Difference tool with CIEDE2000.
- For auditing an entire palette in one view, the Palette Contrast Matrix generates every possible N-by-N foreground-background pair in a single grid.
Frequently Asked Questions
Built by Derek Giordano · Part of Ultimate Design Tools