Skip to main content
Pulxon
Menu

Color contrast for websites: which colors pass and how to fix the rest

By The Pulxon team · Published · 4 min read

Low contrast text is the most common accessibility problem on the web, and it is not close. In WebAIM's February 2026 scan of the top one million home pages, 83.9% had text that failed the minimum contrast rule. It is also one of the easiest problems to fix, which makes it a good place to start.

Contrast matters to more people than you might think. People with low vision, obviously. But also anyone reading a phone outside in the sun, anyone with an older laptop screen, and most of us after the age of forty, when the eye lets in less light. Light gray text on white looks elegant in a design file on a bright monitor. On a real phone in a real kitchen, it disappears.

The numbers, in plain words

WCAG measures contrast as a ratio between the lighter and the darker color, from 1:1 (the same color twice) to 21:1 (black on white). The rules at level AA, which is the level laws and contracts usually ask for:

WhatMinimum ratio
Normal text4.5:1
Large text: 24px and up, or 18.66px and up if bold3:1
Buttons, form field borders, icons that carry meaning, focus rings3:1 against what is next to them
Logos and purely decorative textNo requirement

Text that is part of a disabled control is also exempt. Text over an image has to pass against the part of the image it sits on, which is where a lot of hero banners fail.

Real colors, real ratios

Some pairs we measured on white backgrounds, the most common setting:

Text color on whiteRatioNormal text
#000000, black21:1Passes
#595959, dark gray7:1Passes, even at AAA
#767676, mid gray4.54:1Passes, just
#777777, one step lighter4.48:1Fails
#999999, light gray2.85:1Fails
#1f4bff, our brand blue5.99:1Passes

Look at #767676 and #777777. They are one step apart and you cannot tell them apart by eye, but one passes and the other fails. This is why you measure instead of guessing.

The other classic failure is white text on a bright brand color. White on a vivid orange such as #ff6b00 comes out at 2.86:1, which fails for normal text and only scrapes by for large text. Many "Buy now" buttons in brand orange or light green are exactly this.

Not just text: buttons, fields and icons

WCAG 1.4.11 asks for 3:1 for the parts of the interface people need to see to use it. The outline of a text field against the page. The edge of a button whose background is the same white as the page. A checkbox. An icon with no text next to it, like a magnifying glass for search or a trash can for delete. And the focus indicator that shows keyboard users where they are.

The most frequent failure here is the very light gray form field border, the kind that is almost invisible. A visitor with low vision sees a page of labels with nothing to type into.

How to fix contrast without a redesign

You rarely need new brand colors. Usually it is one of these:

  1. Darken the gray. Most failing text is gray body text or captions. Moving from #999999 to #767676 or darker fixes it, and nobody but the designer will notice.
  2. Keep the brand color, change where it is used. A light brand color can stay for large headings, backgrounds and decoration, and a darker shade of it can be used for text and small buttons.
  3. Flip the button. If white on orange fails, try dark text on the orange, which often passes, or darken the orange slightly for the button only.
  4. Give text over images a backing. A semi-transparent dark layer behind the headline, or a solid panel, makes it pass on every photo instead of just the one in the design mockup.
  5. Darken field borders. A field border of #767676 or darker passes 3:1 on white with room to spare.

Our contrast checker does this for you: put in two colors, it tells you the ratio and, if they fail, suggests the closest color that passes.

A note on dark mode

Dark designs have the same rules in reverse. Mid gray text on a dark gray background is the dark mode version of light gray on white, and it fails just as often. Measure both themes.

What contrast does not fix

Contrast is about whether people can see things. It does not help someone who cannot see the screen at all; that is what alternative text and proper labels are for. And it is one rule of about fifty at level AA. But it is the most common failure by far, and fixing it is usually a few lines of CSS. If you want to see where your pages stand, our free checker flags every element that fails contrast, with the colors and the ratio.

Sources

We are not a law firm and nothing here is legal advice. No audit or fix can promise that a site meets a law; we test against WCAG 2.2 AA and fix what we find.

Want to know where your site stands?

Check one page for free in a real browser, or have a person test the whole site.

More from the blog