WCAG contrast checker
Test any foreground and background color pair for WCAG 2.1 contrast ratio (1 to 21). See pass/fail for Level AA and AAA, for normal text, large text (18pt+ or 14pt bold), and UI components. Essential before shipping buttons, links, and form labels — many brand palettes fail until you darken text or lighten surfaces.
Text color
Background color
Aa Bb Cc — 123
Result
16.12 : 1
AA — Pass
AA (large text) — Pass
AAA — Pass
AAA (large text) — Pass
How to check color contrast
1. Enter or pick foreground (text) and background colors.
2. Read the contrast ratio (e.g. 4.52:1).
3. Check AA and AAA rows for normal and large text sizes.
4. Adjust HSL lightness until required level passes, then copy hex values.
Contrast check examples
Body text #374151 on #FFFFFF
Ratio ≈ 8.9:1 — passes AAA for normal text (needs 7:1). Comfortable long-form reading.
Light gray #9CA3AF on white
Ratio ≈ 2.6:1 — fails AA for normal text (needs 4.5:1). Common placeholder mistake.
Primary button white on #2563EB
Ratio ≈ 4.6:1 — passes AA normal text; bump to darker blue for AAA or large-only use.
When to use this tool
• When you audit design system tokens before release.
• When you fix accessibility findings from Lighthouse or axe.
• When you choose link colors that must differ from body text, not only by hue.
When to choose something else
• When you need full page audit — use automated scanners on rendered DOM.
• When testing non-solid backgrounds (images, gradients) — sample worst-case pixels.
• When simulating color blindness — use specialized vision simulators.
WCAG 2.1 levels explained
Level A is minimum; AA is the legal target in many jurisdictions (ADA, EAA public sector). AAA is aspirational for body copy — large headlines may pass AAA easier than 14px captions. Focus visible indicators (2.4.7) complement contrast — keyboard users need visible focus rings, often 3:1 against adjacent colors. Document pass/fail in your design system next to each token pair.
Fixing failures without rebranding
If brand purple fails on white, do not swap hue — darken foreground 5–10% lightness steps or use purple only for large headings. Placeholder text must meet contrast (4.5:1), not just input values. Disabled states may be exempt from strict text contrast but should not convey critical info by color alone. Pair this checker with the color converter for quick HSL iteration.
Frequently asked questions
What contrast ratio for WCAG AA normal text?
At least 4.5:1 for normal text and 3:1 for large text (18pt+ or 14pt bold).
What for AAA?
7:1 normal text, 4.5:1 large text — stricter, often used for government sites.
Do UI components need contrast?
WCAG 2.1 requires 3:1 for graphical objects and UI component boundaries (1.4.11).
How is ratio calculated?
Based on relative luminance of sRGB colors: (L1 + 0.05) / (L2 + 0.05) where L1 is lighter.
Does underline fix low contrast links?
No — contrast still required. Underlines help non-color cues but do not replace ratio rules.
Is my data sent to a server?
No.
Is this tool free?
Yes.