Skip to content
Nazmul Nikhil
Menu

Background and Foreground Colors Do Not Have a Sufficient Contrast Ratio (PageSpeed Insights)

PageSpeed flags text that's too light against its background. Here's the 4.5:1 rule, how to check colors, and how to fix them without losing your brand.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 1 min read
Background and Foreground Colors Do Not Have a Sufficient Contrast Ratio (PageSpeed Insights)
Photo: Mika Baumeister on Unsplash

In short

PageSpeed flags text whose color doesn't stand out enough from its background. The WCAG minimum is a contrast ratio of 4.5:1 for normal text and 3:1 for large text (about 24 px regular or 18.5 px bold). Low contrast is hard to read for many people and on phones in sunlight. Darken the text or lighten the background until each flagged element passes. Weight 7.

One of the most common accessibility failures on modern sites, especially light grey text and brand-colored buttons.

Common culprits

Element Typical problem
Grey body or caption text #999 on white is below 4.5:1
Placeholder text in forms Very light grey
White text on brand-colored buttons Mid-tone violet, cyan, orange or green
Text over images or gradients Contrast changes across the image
Footer links Low-contrast "subtle" styling

How to fix it

  1. Open the check's "Failing Elements" list; each shows the colors and ratio.

  2. Test alternatives in a contrast checker (Chrome DevTools shows the ratio in the color picker).

  3. Adjust shades in your design system, not element by element, so the fix carries across the site.

  4. For text on images, add a dark overlay.

WordPress: theme customizer color settings or global styles. Shopify: theme settings > Colors. Webflow: update the color swatch or class. Wix: site theme colors. Custom builds: define accessible text tokens (for example, a darker violet for text than for backgrounds).

Common mistakes

  • Fixing only the flagged page. Contrast problems usually live in shared styles.

  • Ignoring hover and disabled states, which also need to be readable.

This guide isn't affiliated with or endorsed by Google.

Sources and references

TAGSPageSpeed InsightsBackground and foreground colors do not have a sufficient contrast ratioColor contrast ratioWcag contrast 4.5:1
Nazmul Nikhil

About the author

Nazmul Nikhil

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.

Need help with this?

Get it fixed with Technical SEO

I find the issues that cost you traffic and fix them, starting with the pages that matter most.

Keep reading

Related articles

All Page Speed & Core Web Vitals posts →

Get the next guide in your inbox

One email when a new SEO or AI search guide goes live.

Ready to grow?

Get a free audit of your website, or book a 30-minute call to talk through your goals.

Nazmul Hasan

Talk to Nazmul directly

Reply within 24h

WhatsApp +880 1682835118
nazmulnikhil@gmail.com