WCAG Color Contrast for UI Designers: Ratios, Rules, Fixes
WCAG Level AA asks for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (18pt, or 14pt bold). Input borders, icons and focus indicators need 3:1 against adjacent colors. Logos and disabled controls are exempt, and ratios must never be rounded up to pass.

Low contrast text is the single most common accessibility failure on the web, and it is almost always a design decision rather than a coding bug. That makes it the designer's problem to fix, and the good news is that the rules are short, numeric and easy to test inside the tools you already use.
This guide is research-based. It walks through what the Web Content Accessibility Guidelines (WCAG) actually require for color contrast, where the common traps are, and a worked example with real hex values you can check yourself.
What contrast ratio does WCAG require for text?
For Level AA, body text needs a contrast ratio of at least 4.5:1 against its background, and large text needs at least 3:1. Those two numbers come straight from Success Criterion 1.4.3, Contrast (Minimum), in the W3C's Understanding SC 1.4.3 document.
"Large" has a precise meaning. W3C defines large-scale text as at least 18 point, or 14 point bold. Its own conversion note says 1pt equals 1.333px, so 14pt and 18pt work out to roughly 18.5px and 24px in CSS. A 16px bold button label is therefore not large text, even though it looks heavy in a mockup. It needs the full 4.5:1.
There are three exceptions:
- Text in an inactive (disabled) control, pure decoration, text nobody can see, or text inside a busy photo has no contrast requirement.
- Text that is part of a logo or brand name has no contrast requirement.
- Everything else is in scope, including placeholder text and text that only appears on hover or focus.
That placeholder point catches a lot of teams. The pale grey hint text inside an input field is held to the same 4.5:1 as the label above it.
How strict is "at least 4.5:1"?
Very strict. The W3C document states that computed values should not be rounded, and gives the example that 4.499:1 does not meet the 4.5:1 threshold. A checker that shows "4.5" after rounding can hide a fail.
Here is where that bites in practice. Using the standard relative-luminance formula, mid-grey #767676 on white comes out at about 4.54:1, which passes. Move one step lighter to #777777 and the ratio drops to about 4.48:1, which fails. To the eye those two greys are identical. To an auditor they are a pass and a fail.
Which contrast levels apply to what?
Text, UI components and enhanced (AAA) text each have their own threshold. This table pulls them together.
| What you are checking | Success criterion | Level | Minimum ratio |
|---|---|---|---|
| Body text and images of text | 1.4.3 Contrast (Minimum) | AA | 4.5:1 |
| Large text (18pt+, or 14pt+ bold) | 1.4.3 Contrast (Minimum) | AA | 3:1 |
| Body text, enhanced | 1.4.6 Contrast (Enhanced) | AAA | 7:1 |
| Large text, enhanced | 1.4.6 Contrast (Enhanced) | AAA | 4.5:1 |
| Input borders, icons, focus indicators, chart parts | 1.4.11 Non-text Contrast | AA | 3:1 against adjacent colors |
| Logos, disabled controls, decoration | Exceptions in 1.4.3 / 1.4.11 | n/a | No requirement |
The AAA figure has a reason behind it. According to W3C's Understanding SC 1.4.6, 7:1 was chosen because it compensates for the contrast sensitivity loss typical of vision around 20/80. AA is the level most teams target, so treat AAA as a target for long-form reading surfaces rather than a blanket rule.
Do buttons, icons and input borders need contrast too?
Yes. Success Criterion 1.4.11, Non-text Contrast, requires a 3:1 ratio against adjacent colors for the visual information needed to identify user interface components and their states, and for the parts of graphics needed to understand content. The W3C's Understanding SC 1.4.11 page gives passing examples such as a text input border in #767676 on white and a dropdown arrow icon at 4.7:1.
This is the rule that hurts minimalist UI kits the most. A field drawn with a hairline #CCCCCC border on white sits at about 1.6:1. If that border is the only thing telling someone "this is an input", it fails.
Three details from the W3C guidance are worth pinning to your design system docs:
- Focus indicators must have enough contrast against the background when the component is focused. A soft glow that looks elegant in Figma can vanish on a real screen.
- Inactive components, such as a disabled button, are not required to meet the ratio.
- If you leave a control in the browser's default style and don't modify it, the default appearance is exempt. Once you restyle it, you own the contrast.
Note the word "adjacent". A white button with a 3:1 border on a white page passes on the border. A solid-fill button with no border has to hit 3:1 between its fill and the page, or carry the meaning some other way, such as a visible text label that already meets 1.4.3.
How is the contrast ratio calculated?
The ratio is (L1 + 0.05) / (L2 + 0.05), where L1 is the relative luminance of the lighter color and L2 the darker one. W3C's technique G18 lays out the full procedure, including the luminance weights for red, green and blue (0.2126, 0.7152 and 0.0722). The heavy green weight explains why a bright teal can look strong yet test weak against white.
You will rarely compute this by hand. Still, knowing the formula helps in two ways. You can sanity-check a plugin that gives an odd answer, and you can script a whole palette at once instead of pasting pairs into a web form one at a time.
G18 also includes a small practitioner detail: for anti-aliased letters, measure the luminance about two pixels in from the edge of the glyph. The 1.4.3 guidance adds that very thin or unusual fonts can render fainter than the CSS color suggests, so W3C encourages choosing typefaces with sturdier strokes. A 300-weight font at 14px can pass on paper and still read poorly.
Worked example: fixing a teal brand accent
Say a studio's brand palette has a bright teal, #00C2B8, and the first mockup uses it as a button fill with white label text. Here is how the numbers play out, calculated with the G18 formula.
| Foreground | Background | Ratio | Normal text (4.5:1) | Large text / UI (3:1) |
|---|---|---|---|---|
| White #FFFFFF | Teal #00C2B8 | 2.23:1 | Fail | Fail |
| Near-black #14141F | Teal #00C2B8 | 8.19:1 | Pass (and AAA) | Pass |
| White #FFFFFF | Darker teal #008A83 | 4.23:1 | Fail | Pass |
| White #FFFFFF | Deep teal #007A74 | 5.20:1 | Pass | Pass |
The original pairing fails even the 3:1 large-text floor. There are two honest fixes, and they lead to different brand outcomes.
The first keeps the bright teal and flips the label to near-black. At 8.19:1 it clears AAA. The button stays loud and on-brand, but dark-on-bright can feel heavier than the designer intended.
The second keeps white text and darkens the fill. #008A83 is a trap: at 4.23:1 it passes for a big 24px headline but fails for a normal 16px button label. You need to go to roughly #007A74 before white body-size text passes. The cleanest approach is to add a darker "teal 700" token to the palette for interactive fills and keep the bright teal for illustrations, large display type and decorative shapes where the rules are looser.
Either way, the decision belongs in the design system, not in each mockup. Name the accessible pairs as tokens once and the whole team stops re-litigating it.
Which tools should designers use to check contrast?
A browser-based checker is fine for spot checks; a plugin inside your design tool is better for daily work. The WebAIM Contrast Checker takes a foreground and background hex value and reports pass or fail for normal text, large text, and graphical objects and UI components. It also exposes a simple API: add "&api" to a permalink and it returns the result as JSON, which is handy for a quick palette script.
A short process that fits most studios:
- Audit the palette, not the screens. List every text-and-background pair your tokens allow and test each one once.
- Mark each pair in the design system as "body OK", "large only" or "decorative only".
- Check every input, checkbox, toggle and focus ring against its neighbour at 3:1.
- Test placeholder text, hover states and text over images separately, because they are the usual escapes.
- Re-check on a real device in bright light before sign-off.
If you are still choosing a design tool for this kind of system work, our Canva vs Figma vs Adobe Express comparison covers which ones handle shared styles and components well. For palette generation, several of the tools in our roundup of the best AI design tools will suggest colors, but none of them guarantee WCAG-passing pairs, so test their output.
Why does contrast matter beyond good practice?
Because it is measurable, widespread and increasingly tied to law. The WebAIM Million 2026 report found detected WCAG failures on 95.9% of the top one million home pages. Low contrast text was the most common issue, found on 83.9% of home pages, up from 79.1% in 2025, with an average of 34 distinct instances per page. WebAIM notes its automated scan cannot prove a page is accessible, so those numbers are a floor.
On the legal side, the European Accessibility Act (Directive (EU) 2019/882) has applied since 28 June 2025. Ireland's National Disability Authority explains that it covers products and services such as e-commerce, e-books and consumer banking, and applies to any company that wants to trade in the EU regardless of where it is based. Contrast is one of the most visible things an auditor will check, and one of the cheapest to get right at the design stage.
Where contrast rules stop helping
The ratio is a minimum, not a guarantee of readability. A pairing can pass 4.5:1 and still be tiring if the font is thin, the line length is long, or the text sits on a busy gradient. The contrast criteria measure luminance only, so they say nothing direct about color-blind confusion between, say, red and green status chips. Don't let color be the only signal; pair it with an icon or label.
There are also cases where the rules don't apply. Logos are exempt, so a brand mark doesn't need redesigning to pass. But the exemption covers the logotype itself, not the tagline or navigation set next to it.
Recommendation
Treat 4.5:1 for text and 3:1 for UI parts as hard numbers, never rounded, and test them once at the palette level. If your brand color fails with white text, add a darker interactive shade or switch to dark text rather than arguing for an exception. Then spend your design energy where the ratio can't help: type weight, hierarchy and layout. Accessible color is a solved problem; it just has to be solved on purpose.
How this was made: researched and written by the Hackinen Studios editorial team with AI-assisted drafting; ratios calculated with the WCAG formula and facts checked against the linked sources as of November 2026.
Frequently asked questions
What is the minimum WCAG contrast ratio for body text?
For Level AA, body text needs a contrast ratio of at least 4.5:1 against its background. That figure comes from Success Criterion 1.4.3 in WCAG 2.2. Level AAA raises it to 7:1. Text that is part of a logo, pure decoration or a disabled control has no requirement, but placeholder text and hover text are still in scope and must pass.
Does placeholder text need to meet contrast requirements?
Yes. The W3C guidance for Success Criterion 1.4.3 treats placeholder text like any other text, so it needs 4.5:1 at normal sizes. Many UI kits ship very pale placeholder greys that fail. A common fix is to darken the placeholder to a grey around #767676 on white, or to move the hint outside the field as helper text.
Do logos have to meet WCAG color contrast rules?
No. WCAG states that text which is part of a logo or brand name has no contrast requirement, so you do not need to redesign a brand mark to pass. The exemption is narrow, though. Taglines, navigation, buttons and headings set in brand colors next to the logo are ordinary content and must meet the normal ratios.
Is 4.48:1 close enough to count as 4.5:1?
No. The W3C documents say computed contrast values should not be rounded, and give the example that 4.499:1 does not meet the 4.5:1 threshold. Some checkers display rounded figures, which can hide a narrow fail. When a pair sits right at the line, nudge the darker color one or two steps darker so the margin is clear.
Do disabled buttons need to pass contrast checks?
No. Both Success Criterion 1.4.3 and 1.4.11 exempt inactive user interface components, so a disabled button or greyed-out field does not need to meet the ratios. Designers should still make sure the disabled state is recognisable and that active controls next to it clearly pass, so people can tell which options are available.
Sources
- W3C: Understanding Success Criterion 1.4.3 Contrast (Minimum)
- W3C: Understanding Success Criterion 1.4.11 Non-text Contrast
- W3C: Understanding Success Criterion 1.4.6 Contrast (Enhanced)
- W3C: Technique G18, contrast ratio of at least 4.5:1
- WebAIM: Contrast Checker
- WebAIM: The WebAIM Million 2026 report
- National Disability Authority: European Accessibility Act