Text must have enough contrast with its background
Normal text needs a contrast ratio of at least 4.5:1 against its background, and large text at least 3:1, so people with weaker eyesight can still read it.
| Rule ID | color-contrast |
|---|---|
| Impact | Serious |
| Success criterion | 1.4.3 Contrast (Minimum) · AA |
| Standards | WCAG 2.0 · WCAG 2.1 · WCAG 2.2 · Section 508 · EN 301 549 |
| Fixed automatically |
Example
<style>
.price-note { color: #9a9a9a; background: #ffffff; }
</style>
<p class="price-note">Free delivery on orders over $50</p>Light grey on white (2.8:1): many visitors squint or miss the delivery offer entirely.
<style>
.price-note { color: #595959; background: #ffffff; }
</style>
<p class="price-note">Free delivery on orders over $50</p>Dark grey on white (7:1): the offer is easy to read, even on a phone in sunlight.
Why it matters
Around one in twelve men has some form of color vision deficiency, and many more people live with low vision, cataracts or age-related loss of contrast sensitivity. For them, pale grey text, white text on a yellow button or a caption over a busy photo can be hard or impossible to read.
Contrast problems also hit everyone else: a phone screen outdoors, a cheap laptop panel or a dimmed display all wash colors out. Low-contrast text is one of the most common accessibility failures on the web, and it is easy to spot in an audit, so it often appears in legal complaints.
How to fix it
Measure the ratio between the text color and the background behind it, then darken the text or lighten the background (or the reverse in dark themes) until it passes.
Normal text (below 24px, or below about 18.7px when bold) needs 4.5:1.
Large text (24px and up, or 18.7px and up in bold) needs 3:1.
<style>
.btn-sale { color: #ffffff; background: #c2410c; } /* 5.2:1 */
</style>
<button class="btn-sale">Shop the sale</button>
Placeholders and hints. These count as text. A light grey ::placeholder usually fails; darken it, or move the hint into a visible label.
Text over images. Add a solid or semi-transparent overlay behind the text, or a text shadow, so every part of the image behind the letters keeps enough contrast:
<h2 style="background: rgba(0, 0, 0, 0.65); color: #ffffff;">Summer collection</h2>
Brand colors. Keep the brand color for large headings and backgrounds, and pick a darker shade of it for body text and links.
Disabled controls, logos and purely decorative text are exempt.
Checklist
- Give normal text a contrast of at least 4.5:1.
- Give large or bold large text at least 3:1.
- Check placeholders, hover states and dark mode too.
- Put an overlay behind text that sits on photos.
How the check works
The check computes the foreground color of each visible text element and the background behind it, including opacity and overlapping elements, and compares the ratio with 4.5:1 (3:1 for large text). It fails when the ratio is too low. When the background is an image, a gradient or hidden behind another element, it cannot compute the ratio and asks you to verify it manually.
Resources
- Understanding 1.4.3 Contrast (Minimum) W3C
- W3C ACT rule afw4f7 W3C ACT
- W3C ACT rule 09o5cg W3C ACT
- Designing for web accessibility: tips W3C WAI
- Easy checks: a first review of accessibility W3C WAI
Updated October 27, 2026