Color contrast failures make up the majority of accessibility audit findings on the average website — and yet the fix is almost always simple once you know the exact numbers. The confusion usually isn't about whether to fix it; it's about which ratio applies to which element, and what "AA" versus "AAA" actually means in practice.
This guide breaks down WCAG 2.2's contrast requirements in plain terms: the exact ratios for text, UI components, and the new focus-indicator rule, illustrated with real hex codes that pass and fail. Start with the live checker below, then use the reference tables as you work through your own palette.
🧪 Try It: Live WCAG Contrast Checker
Remember: the ratio only tells half the story. Pair every color decision with non-text contrast checks for buttons and icons, and never rely on color alone to convey meaning (WCAG 1.4.1).
✦ Why Contrast Ratios Matter
WCAG doesn't measure contrast by how different two colors look on the color wheel — it measures relative luminance, a value derived from the sRGB channels after linearization. That's a technical way of saying: two colors can look wildly different in hue and still sit at nearly the same brightness, producing a contrast ratio far below what's needed. Yellow text on white is the classic example — visually distinct, numerically a near-fail.
This is also why the fix is almost always the same three moves: darken the text, lighten the background, or add a solid scrim behind text placed over busy imagery.
📝 How to Check WCAG Contrast: Step-by-Step
Identify the Text Size
Determine if your text is normal or large — this changes which threshold applies. Large text is 18pt (~24px) regular or larger, or 14pt (~18.66px) bold or larger.
Get the Exact Rendered Colors
Pick colors from the live page, not the design file — CSS variables, opacity, and overlays can shift the computed color away from what a Figma swatch shows.
Calculate the Ratio
Enter both hex codes into a contrast checker (like the tool above) to get the exact luminance ratio, expressed as X:1.
Compare Against the Threshold
Check the ratio against 4.5:1 (AA normal text), 3:1 (AA large text and UI components), or 7:1 / 4.5:1 for AAA.
Adjust and Retest Every State
Darken text or lighten background as needed, then retest hover, focus, active, and disabled states independently — WCAG requires each state to meet the same contrast rules on its own.
⚖️ AA vs AAA at a Glance
| Requirement | Level AA | Level AAA |
|---|---|---|
| Normal text (SC 1.4.3 / 1.4.6) | 4.5:1 | 7:1 |
| Large text (18pt+ / 14pt+ bold) | 3:1 | 4.5:1 |
| UI components & graphical objects (SC 1.4.11) | 3:1 | No separate AAA criterion |
| Focus indicators (SC 2.4.11, new in 2.2) | 3:1 against adjacent color | — |
| Legal status | Referenced by ADA, Section 508, EN 301 549 | Aspirational, rarely mandated site-wide |
A useful mental model: AA is the floor, not the ceiling. A pair that scores 4.52:1 technically passes, but some readers will still find it uncomfortable — WCAG sets a legal minimum, not a comfort guarantee. Many teams treat AAA (7:1) as the target for long-form body copy and data tables specifically, while accepting AA elsewhere.
🔠 What Counts as "Large Text"?
This distinction trips up a lot of teams: a heading styled at 20px bold qualifies as large text and only needs 3:1, while the same weight at 16px does not qualify and needs the full 4.5:1. When in doubt, measure the actual rendered font-size and font-weight in DevTools rather than assuming from the design file.
🔲 Non-Text Contrast: Buttons, Borders & Icons
A common real failure: a light grey button outline on a white background can look fine, then fail this criterion outright because the border itself never reaches 3:1 against the page. A few practical notes:
- Applies to: button borders, input field borders, focus rings, toggle switches, meaningful icons (like a warning symbol).
- Exempt: purely decorative graphics, logos, brand marks, and inactive/disabled components.
- Icon + text combo: if an icon is paired with a text label that itself meets 4.5:1, the icon no longer needs to independently meet 3:1, since it's no longer "required to understand the content."
🆕 New in WCAG 2.2: Focus Appearance
If your CSS resets strip the default browser outline for aesthetics, this criterion requires you to add back a visible, sufficiently-contrasted replacement — otherwise keyboard users lose any indication of where they are on the page. This is the headline contrast-related change in the 2.2 update; the core text ratios (4.5:1 / 7:1) are unchanged from 2.1.
🎨 Check Your Full Color Palette
Convert HEX, RGB & HSL, generate tints and shades, and test contrast pairs — free, no signup, right in your browser.
Open the Free Color Picker →🔬 Real Contrast Failures (and Their Fixes)
Notice the pattern: neither fix required abandoning the brand color family — just shifting depth within it. That's usually all it takes to move a failing pair into passing territory without a full rebrand conversation.
🌙 Contrast Rules in Dark Mode
| Pair | Ratio | Note |
|---|---|---|
| #FFFFFF on #000000 | 21:1 | Max contrast, can cause glare/eye strain for some users |
| #E0E0E0 on #1A1A1A | ~13:1 | Still comfortably passes AAA, often more comfortable to read |
The takeaway: WCAG sets a floor, not a target of "as high as possible." Extremely high contrast isn't automatically the most readable choice for every user — it's worth testing softened dark-mode pairs rather than defaulting straight to pure black and white.
🛠️ Tools for Testing WCAG Contrast
- Browser DevTools: inspect an element, and the color swatch in the Styles panel shows the live contrast ratio — genuinely one of the fastest checks available.
- Manual contrast checkers: paste in two hex codes for an instant AA/AAA pass-fail verdict — ideal for spot-checking brand colors before they enter a design system.
- Design-file plugins: catch issues before handoff to development, when they're cheapest to fix.
- Automated CI tools: run contrast checks on every build to prevent regressions, though they typically catch only a portion of real issues — dynamic content, SVGs, and CSS-generated content usually need manual review too.
🚫 Common WCAG Contrast Mistakes
- Checking design files, not rendered output. Opacity, blend modes, and CSS variables can quietly shift computed color.
- Forgetting non-text elements. Buttons and borders need 3:1 too, independent of any text inside them.
- Using opacity for placeholder or disabled text. Opacity-based greys almost always fail — use a concrete hex value instead.
- Testing only the default state. Hover, focus, and active states must each independently meet contrast requirements.
- Stripping focus outlines for aesthetics. Removing
outlinewithout a compliant replacement fails SC 2.4.11 in WCAG 2.2. - Assuming AAA everywhere is the goal. Full-site AAA conformance is rare and often impractical — apply it selectively to critical or long-form content instead.
🏁 Conclusion
WCAG 2.2 color contrast comes down to a short list of exact numbers: 4.5:1 for normal text and 3:1 for large text and UI components at Level AA, rising to 7:1 and 4.5:1 at Level AAA — plus the new 3:1 focus-indicator rule from Success Criterion 2.4.11. None of it requires guesswork once you're testing the actual rendered colors against the right threshold for the right element type.
Use the live checker above on your own brand pairs, keep AA as your non-negotiable floor, and reach for AAA selectively where it genuinely helps — long-form reading, critical forms, health or financial content. Fix the failures you find by darkening text or deepening backgrounds within your existing palette, and you'll clear most audits without touching your brand identity.
❓ Frequently Asked Questions
What is the WCAG 2.2 contrast ratio for normal text?
WCAG 2.2 Success Criterion 1.4.3 requires a minimum contrast ratio of 4.5:1 for normal text at Level AA, and 7:1 at Level AAA (Success Criterion 1.4.6).
What counts as large text under WCAG?
Large text is defined as 18 point (roughly 24px) regular weight or larger, or 14 point (roughly 18.66px) bold or larger. Large text needs only 3:1 contrast at AA and 4.5:1 at AAA.
Do buttons and icons need to meet WCAG contrast requirements?
Yes. Success Criterion 1.4.11 Non-text Contrast requires user interface components like buttons, form field borders, and focus indicators to have at least 3:1 contrast against adjacent colors, separate from the text contrast rules.
Is WCAG AA or AAA legally required?
Level AA is the legal baseline referenced by most accessibility laws, including the ADA, Section 508, and the EU's EN 301 549. Level AAA is aspirational and rarely mandated site-wide.
What's new about contrast in WCAG 2.2?
The core text contrast ratios (4.5:1 and 7:1) are unchanged from WCAG 2.1. WCAG 2.2 adds Success Criterion 2.4.11 Focus Appearance, requiring visible focus indicators to have at least 3:1 contrast against adjacent colors.
Does pure black text on pure white background pass WCAG?
Yes, black on white gives a 21:1 contrast ratio, far exceeding both AA and AAA. However, some accessibility guidance suggests off-white on near-black is more comfortable and still easily passes AAA.
Why does my grey text fail WCAG contrast?
Common failure: #808080 grey on white gives only 3.95:1, failing AA for normal text. Darkening to #767676 gives 4.54:1, which barely passes AA; #595959 is a more comfortable, safer choice.
Do placeholder text and disabled buttons need to meet contrast requirements?
Placeholder text styled with low opacity commonly fails 1.4.3 and should use a solid hex color of at least #767676 on white. Disabled UI components are generally exempt from 1.4.11 non-text contrast requirements.
How do I test WCAG color contrast on my website?
Use a contrast checker tool to enter your exact foreground and background hex codes, or use browser DevTools, which show the contrast ratio directly in the color picker when inspecting an element.
Does WCAG contrast alone make a design accessible for color blind users?
No. Meeting contrast ratios is necessary but not sufficient. Success Criterion 1.4.1 Use of Color requires that color is never the only way information is conveyed — always pair color with text labels, icons, or patterns.