Color contrast and WCAG: the ratios you need and how to fix low contrast

Updated October 26, 2026 · 11 min read

Short answer. Normal text needs a contrast ratio of at least 4.5 to 1 against its background, large text needs 3 to 1, and interface parts such as input borders and icons need 3 to 1. Test each color pair with a contrast checker and darken the text, lighten the background or add a solid layer behind text on images.

The requirements

WhatWCAG criterionMinimum ratio
Normal text1.4.3 Contrast (Minimum), AA4.5 to 1
Large text (about 24 px, or about 18.7 px if bold)1.4.3, AA3 to 1
Input borders, icons that carry meaning, focus indicators1.4.11 Non-text Contrast, AA3 to 1
Logos and disabled controlsExemptNone

These come from WCAG 2.2. The ratio compares the brightness of two colors on a scale from 1 to 1 (no difference) to 21 to 1 (black on white).

How to test

  1. Find the exact text and background colors, from your design file or the browser's inspect tool.
  2. Enter them in a contrast checker such as the WebAIM Contrast Checker.
  3. Read the ratio and compare it with the table above.
  4. Test hover, focus, disabled and error states too, not just the default.

Typical failures and fixes

Light gray body text

Pale gray looks refined and fails often. On a white background the lightest gray that passes 4.5 to 1 is #767676; #777777 falls just short.

Before and after (CSS)
/* Before: #999999 on white is about 2.8 to 1 (fails) */
.meta { color: #999999; background: #ffffff; }

/* After: #595959 on white is about 7 to 1 (passes) */
.meta { color: #595959; background: #ffffff; }

Text over a photo

A busy image changes contrast from one spot to the next. Put a solid or semi-opaque layer behind the text, or move the text off the image.

A darkening layer behind hero text (CSS)
.hero { position: relative; }
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.hero h1, .hero p { position: relative; color: #ffffff; }

Always measure the result at the lightest part of the image under the text.

Buttons and form fields

White text on a pale blue button is a common fail. Also check the border of an input: a light gray outline around a white field often falls below 3 to 1, which makes the field hard to see.

Color alone

WCAG 1.4.1 also asks that color is never the only way to convey meaning. Mark required fields with text or an icon as well as red, and underline links within paragraphs.

What the ratio actually measures

Contrast ratio compares the brightness of two colors, from 1 to 1 (identical) to 21 to 1 (black on white). It is calculated from the relative luminance of each color, which accounts for how the human eye perceives red, green and blue differently. You do not need to do the math yourself, because any contrast checker will do it. What matters is the target: 4.5 to 1 for normal text, 3 to 1 for large text and for the visual parts of controls.

Large text means roughly 24 pixels or more, or about 19 pixels or more if bold. Many designs use text smaller than that, so assume the 4.5 to 1 rule applies unless you know otherwise.

Who benefits from good contrast

  • People with low vision, who may not be able to read faint text at all.
  • People with some color vision deficiencies, who may see two colors as almost the same.
  • Older adults, whose eyes often need more contrast.
  • Anyone using a phone in bright sunlight, or an old monitor.
  • Anyone who is tired, ill or in a hurry.

Four contrast rules, in order of how often they are missed

RuleRequirementWhere it is often missed
1.4.3 Contrast (Minimum)Text: 4.5 to 1, or 3 to 1 for large textGrey body text, placeholder text, footer links, text on photos
1.4.11 Non-text ContrastControls and meaningful graphics: 3 to 1 against neighborsForm field borders, icon buttons, chart lines, focus outlines
1.4.1 Use of ColorColor is not the only way to show meaningRed error text with no icon or message, links with no underline
1.4.6 Contrast (Enhanced), AAA7 to 1 for textOptional target; useful for long reading

Exceptions you may rely on

The standard excludes a few things. Logos and brand names are exempt. Text that is purely decorative is exempt. Inactive controls, such as a disabled button, are exempt, though it is kinder to keep them readable. Text that is part of a picture and has no purpose in conveying information is exempt. Be careful with this last one: if the text carries information, the rule applies.

Fixing low contrast, step by step

  1. Collect your brand colors and list every text-and-background pair your site uses.
  2. Test each pair with a contrast checker and mark which fail.
  3. For each failure, darken the text or lighten the background until the ratio passes. Often a small change is enough.
  4. If a brand color is too light for text, use it for large decorative areas and use a darker shade for text and buttons.
  5. Test states: hover, focus, visited, disabled and error.
  6. Write the approved pairs into your style guide so designers and editors use them.

Text over images and gradients

Scanners cannot measure text over a photo reliably, because the background changes behind each letter. Test it yourself. Place a solid or semi-transparent layer behind the text, choose images with calm areas for text, or move the text off the image. Check the result at desktop and phone sizes, since the crop of a photo changes and so does what sits behind the words.

Dark mode and themes

If your site offers a dark theme, test it separately. A pair that passes in light mode may fail in dark mode, and the reverse. Pay attention to links, borders and focus indicators, which are often tuned for one mode only.

Common mistakes

  • Testing only the headline and not the small print.
  • Using a light grey for placeholder text and treating it as decoration.
  • Passing the check for text, then forgetting the border of the form field.
  • Relying on a color name instead of measuring the actual value.
  • Changing a theme color without retesting every component that uses it.

Some real numbers to calibrate your eye

It is hard to judge contrast by looking, especially on a good monitor. These examples are all text on a white background and give you a feel for the boundaries.

Text colorApproximate ratio on whitePasses 4.5 to 1?
#000000 (black)21 to 1Yes
#595959 (dark grey)About 7 to 1Yes
#767676 (mid grey)About 4.5 to 1Just passes. This is the lightest grey that works for normal text on white
#777777About 4.48 to 1Just fails
#999999 (light grey)About 2.8 to 1No
#0066CC (blue link)About 5.6 to 1Yes
#FF6600 (bright orange)About 2.9 to 1No for small text

A common surprise is that popular light greys and bright accent colors fail. Designers often choose them for a soft feel, and the fix is small: darken the text a few steps.

Fixing a brand palette without rebranding

  1. Keep the brand colors for logos, backgrounds, illustrations and large display text where contrast is less strict.
  2. Derive a darker shade of each brand color for small text and buttons. A darker version of the same hue still feels like the brand.
  3. Derive a lighter tint for backgrounds, and place dark text on it.
  4. Document the pairs in your style guide, with the ratio for each.
  5. Review new campaigns against the guide before they go live.

Buttons need contrast in two places: the label against the button fill, and the button against the page, unless the label itself shows where the button is. A white label on a pale blue button is a typical failure. Links in running text should be distinguishable by more than color, so underlines are a safe default. Form fields need a border or background that meets 3 to 1 against the page, because without a visible boundary people cannot tell where to click. See form labels.

States people forget

  • Hover and focus: the changed color should still pass.
  • Visited links: a faded purple on a dark background is a classic failure.
  • Disabled controls: exempt, but still readable if people need to understand what is unavailable.
  • Error and success messages: pale green on white is common and hard to read.
  • Placeholder text: often the lightest text on the whole page.
  • Charts: lines and bars that rely only on color to be told apart.

Tools worth using

Browser developer tools show the contrast ratio when you inspect a text element, and many design tools have built-in checks or plugins. Standalone contrast checkers let you enter two colors and see the result instantly. For a whole page, use a scanner for plain text and then check images, gradients and states by hand. See free accessibility checkers compared.

How to explain contrast to a designer or client

Resistance to contrast fixes often comes from the worry that the design will look heavy. A practical way to answer is to show a side-by-side with a small adjustment. A shift from light grey to a slightly darker grey usually looks nearly identical on a designer's monitor and is much easier to read on a laptop in a bright room. Framing the change as readability for customers, not as compliance, keeps the conversation useful.

A worked example: fixing a product card

A product card has a white background, a title in dark grey, a price in light grey, a "Sale" label in white on bright orange and a button in white on pale teal. The scanner reports three failures. The price is about 2.7 to 1 and needs darkening to at least #767676, though a darker value such as #595959 reads better. The sale label fails at roughly 2.9 to 1, so the team switches to a deeper orange-red with white text, or dark text on the orange. The button fails too; darkening the teal until the white label reaches 4.5 to 1 solves it without changing the hue. Total time: about twenty minutes, and every product card on the site is fixed because they share one style.

Contrast for people with color vision deficiency

About one in twelve men and one in two hundred women have some form of color vision deficiency. Red and green are the most commonly confused pair. This is why WCAG asks that color not be the only way to show meaning. A form that marks errors only in red, a chart that distinguishes lines only by green and red, or a stock indicator that uses a green dot and a red dot with no words will fail these users. Add text, icons, patterns or labels.

Contrast ratio and color blindness are separate topics. A pair can have enough luminance contrast and still be indistinguishable to someone who confuses the hues, which is why you should never use color alone.

Questions people ask about contrast

  • Does the rule apply to text in images? Yes, if the text carries information. Logos and purely decorative text are exempt.
  • What about large headings in light colors? Large text only needs 3 to 1, which gives designers more freedom for display type. Still, test it, since very thin fonts are hard to read even when the ratio passes.
  • Do I need to check every page? Check your style, not every page. If the pairs in your design system pass, pages built from them pass. Test content with custom colors separately.
  • Is a dark theme automatically better? Not necessarily. Light text on a dark background can pass easily, but pure white on pure black can cause glare for some readers. A very dark grey with an off-white text is often more comfortable.

If you only do one thing, check your body text, your links and your buttons. These make up most of what a visitor reads and clicks.

How Clir reports contrast

Clir's report flags contrast findings with the measured ratio, the colors involved and the element, so the fix is a specific value to change. It cannot measure text placed over images reliably in every case, so those can appear as items to review. See the methodology.

Common questions

Do logos have to meet contrast ratios?

No. Logos and brand names are exempt from the text contrast requirement, as are inactive controls.

Does dark mode need to pass too?

Yes. Each theme a visitor can choose needs to meet the ratios.

What is the minimum color contrast for WCAG AA?

4.5 to 1 for normal text and 3 to 1 for large text, and 3 to 1 for the visual parts of controls and meaningful graphics.

Do logos have to meet contrast rules?

No. Logos and brand names are exempt from the contrast requirement for text.

Does placeholder text need to meet the contrast ratio?

Yes, if it conveys information a user needs, it should meet 4.5 to 1. Better still, use a visible label and keep the placeholder for an example.

Can a scanner check all contrast problems?

It can measure most plain text on a solid background. It cannot reliably measure text over photos, gradients or changing states, so check those by hand.

What is a good color contrast checker?

Any tool that takes two colors and reports the ratio will do, including free web tools from WebAIM and extensions for Chrome. A color contrast checker with an eye dropper helps when you need to sample colors from a design.

Is there a free website contrast checker?

Yes. Free web tools, browser developer tools and extensions all report contrast ratios. A free website contrast checker online covers plain text, and you still check images and states by hand.

How does a website contrast ratio checker work?

It converts each color to its relative luminance and divides the lighter by the darker, after adding a small constant. The result runs from 1 to 1 up to 21 to 1.

How do colorblind people see websites?

It varies. People with red-green color blindness may confuse reds, greens and browns, while others have difficulty with blue and yellow or see little color at all. Do not use color alone to show meaning.

Is there a color contrast checker for images or print?

Contrast tools work on any two colors, so you can sample from an image or a print design. WCAG applies to screens; print has its own guidance.

Can the website accessibility contrast checker find all contrast problems?

No. Contrast checkers measure plain text on solid backgrounds well, and they struggle with text over photos, gradients and changing states.

See what a scan finds on your own site

Run a free scan on one page, no signup. For the full picture, the $99 One Page assessment adds a detailed report, a Fix Pack and two rechecks.

Clir runs automated checks against WCAG 2.2 Level A and AA success criteria. How Clir tests.

Sources