How to fix “Elements must meet minimum color contrast ratio thresholds”
By Justin Zagar · Updated
Some text on the page is too faint against what's behind it. Normal text needs a contrast ratio of at least 4.5 to 1 with its background, and large text needs 3 to 1. Darken the text, lighten the background, or both, then check the pair again.
- axe rule
color-contrast- WCAG
- 1.4.3 Contrast (Minimum) (Level AA)
- Lighthouse
- Google Lighthouse and PageSpeed Insights report it as “Background and foreground colors do not have a sufficient contrast ratio.”
What it means
Contrast ratio compares how light the text is with how light its background is. It runs from 1 to 1 (white on white) up to 21 to 1 (black on white). WCAG 2 sets the floor at 4.5 to 1 for normal text and 3 to 1 for large text, which W3C defines as 18 point, or 14 point bold.
It's the most common failure there is. The WebAIM Million found low contrast text on 83.9% of the million home pages it checked in February 2026. The usual suspects are light grey body text, white text on a pale photo or a brand color, placeholder text inside form fields, and footer links.
Who it affects
People with low vision or color blindness, older readers, and anyone reading a phone outside in the sun.
How to find it
- Run the free checker on the page. Each contrast failure lists the element, its colors and the ratio it got.
- Paste any text and background color pair into the contrast checker to see the ratio and try darker shades.
- Look at hover and focus colors too. A link can pass at rest and fail when you point at it.
- Text over photos needs a person to look. The scanner often can't tell what's behind it and lists it as something to review.
How to fix it
- Change the color in the theme's settings, not on each page, so every page picks it up at once.
- Darken the text first. Most failures are mid grey text that only needs to move a few shades.
- For text over a photo, put a solid or semi solid panel behind the words, or darken the photo where the text sits.
- Keep your brand color for large headings and buttons with big text, where 3 to 1 is enough, and use a darker shade of it for small text.
- Check the new pair, then run the page again.
Grey body text on white
p { color: #999999; background: #ffffff; }
/* about 2.8 to 1: fails */p { color: #595959; background: #ffffff; }
/* about 7 to 1: passes */Ratios measured with a contrast checker. Check your own pair, since a shade or two either way changes the answer.
White text on a photo
<div class="hero" style="background-image:url(storefront.jpg)">
<h1 style="color:#fff">Spring sale</h1>
</div><div class="hero" style="background-image:url(storefront.jpg)">
<h1 style="color:#fff; background:rgba(0,0,0,.65); padding:.25em .5em">
Spring sale
</h1>
</div>The dark panel behind the words gives them a known background, whatever the photo does.
From a real fix
On a small law firm's WordPress site I worked on in October 2026, 4,111 of the 4,499 failing elements were contrast. Most of them traced back to one gold brand color used for small text. I added a darker gold for text on light backgrounds and changed it once, at the theme level, instead of page by page.
In your website builder
Where each platform’s own help pages cover it, as of November 2026. Menus move, so follow the link if a step doesn’t match what you see.
- WordPress
- In a block theme: Appearance > Editor > Styles > Colors > Elements, then set Text, Links, Headings and Buttons. Classic themes keep colors under Appearance > Customize, in the theme's own section. WordPress help
- Squarespace
- Site styles > Colors > Edit palette. Sections take their colors from a color theme, so also check Edit section > Colors. Squarespace help
- Wix
- In the Wix Editor: Site Design > Color theme, or Customize > Advanced Settings for text colors. Wix help
- Shopify
- Online Store > Edit theme > Theme settings > Colors > Schemes, then the Background and Text colors of each scheme. Shopify help
- Webflow
- Set your text and background colors as color variables in the Variables panel, so one change reaches every element that uses them. Webflow help
Questions people ask
Do logos have to meet the contrast ratio?
No. W3C exempts text that's part of a logo or brand name, and text that's pure decoration. Everything else that carries meaning, including small print and footer links, needs the ratio.
Does placeholder text count?
Yes, if it's text a person needs to read. Placeholder text is often a pale grey that fails, which is one more reason to put the field's name in a visible label instead.
What a scanner can and can’t tell you
Fixing this clears one automated check. It doesn’t mean the page is accessible, and it doesn’t settle any legal question. Automated tests catch only part of the problems. W3C puts it plainly: evaluation tools “can not determine accessibility, they can only assist in doing so.” The rest takes a person working through the site with a keyboard and a screen reader.
Source: W3C WAI, Selecting Web Accessibility Evaluation Tools. Not legal advice.
Sources
All checked November 8, 2026. The rule wording is axe-core 4.14.0’s own.
Related fixes
- Links must have discernible text
Links with no text
- Form elements must have labels
Form fields without labels
- Zooming and scaling must not be disabled
Zoom turned off
Check a page for free
Scan any page of your site against WCAG 2.1 AA in about 30 seconds. You get the problems automated testing finds, in plain words, with a link to a fix guide for the common ones.
Rather have someone fix it for you? Tell me about your site.