Web Design

Color Contrast for WCAG: Ratios, Large Text and Fixes That Keep Your Brand

A two-color risograph print in sunflower yellow and charcoal black of two lemons on a linen tablecloth, one on a dark slate plate where it stands out sharply and one on a pale cream plate where it almost disappears, a visual for color contrast and the WCAG ratios that decide whether text and buttons can be seen

Color contrast is the accessibility failure that automated scanners find most often. WCAG 2.2 sets the floor at 4.5:1 for normal text, and at 3:1 for large text, buttons, form borders and chart lines.

Our web accessibility guide gives contrast one line in its hour-long manual check. This piece goes deeper on that one question. It covers the four WCAG rules that deal with color, what counts as large text, how the ratio is worked out, the tools, the failures common on nonprofit and association sites, and how to fix them without a rebrand.

The short version: test text at 4.5:1, or 3:1 if it is large. Test buttons, field borders, focus rings, icons and chart lines at 3:1. Never let color alone carry meaning. Most failures trace back to a few brand colors, so fix them once in the design system, usually by darkening a shade or switching the text from white to black.

The four WCAG rules on color contrast

Four success criteria in WCAG 2.2 deal with color. Three set ratios. One says color cannot be the only signal.

Criterion Level What it covers Minimum
1.4.3 Contrast (Minimum) AA Text and images of text 4.5:1, or 3:1 for large text
1.4.6 Contrast (Enhanced) AAA Text and images of text 7:1, or 4.5:1 for large text
1.4.11 Non-text Contrast AA Parts of controls and graphics needed to identify or understand them 3:1 against adjacent colors
1.4.1 Use of Color A Any information shown by color Color is never the only cue

The W3C’s Understanding 1.4.3 page lists three exceptions. Text in an inactive control, pure decoration and text nobody can see is exempt. So is text inside a photo with a lot of other content. Logos are exempt too: "Text that is part of a logo or brand name has no contrast requirement."

The Understanding 1.4.6 page explains the numbers. The 4.5:1 level makes up for the contrast loss typical of 20/40 vision, which it says is common around age 80. The 7:1 level makes up for loss equal to about 20/80 vision.

Non-text contrast, 1.4.11, arrived in WCAG 2.1. It is the rule many older themes miss, because it did not exist when they were built.

What counts as large text

WCAG defines large text as at least 18 point, or at least 14 point bold. Websites set sizes in pixels, so the conversion matters.

The Understanding pages say "1pt = 1.333px" and that "14pt and 18pt are equivalent to approximately 18.5px and 24px." WebAIM’s Contrast Checker gives the bold figure as 18.66px. Both come from the same math. The W3C rounds down, and WebAIM does not.

In practice, use these working rules:

  • Regular weight: large from 24px.
  • Bold: large from about 19px, which clears both figures.
  • Everything else: 4.5:1.

Two cautions apply. Thin or unusual fonts can render fainter than their color value suggests, and the W3C suggests a font "with stronger/thicker lines" or a stronger color pair. And a 24px heading in a light weight is large by the rule, yet may still be hard to read. Our position: treat the 3:1 large-text allowance as a floor for headings, never as the target for body copy.

How the color contrast ratio is calculated

The ratio compares the relative luminance of two colors. Luminance runs from 0 for black to 1 for white. The W3C publishes the formula on its relative luminance page.

For each channel (R, G, B):
  C = value / 255
  if C <= 0.04045: C = C / 12.92
  else:            C = ((C + 0.055) / 1.055) ^ 2.4

L = 0.2126 * R + 0.7152 * G + 0.0722 * B

Contrast ratio = (L1 + 0.05) / (L2 + 0.05)
  where L1 is the lighter color and L2 the darker

The weights explain a lot. Green counts for about 72% of luminance and blue for about 7%. That is why a bright blue can look strong yet fail, and why yellow on white almost always fails.

Ratios run from 1:1 for two identical colors to 21:1 for black on white. The W3C says "the computed values should not be rounded," so 4.499:1 fails 4.5:1.

That rule bites more often than you would think. By our calculation with the formula above, gray #767676 on white is 4.54:1 and passes. One step lighter, #777777 is 4.48:1 and fails.

Older references use a threshold of 0.03928 instead of 0.04045. The W3C changed it in May 2021 and says "It has no practical effect on the calculations in the context of these guidelines."

Tools for checking color contrast

You do not need to run the formula by hand. Two free tools cover most color contrast work.

WebAIM Contrast Checker. Enter a foreground and background color in hex. It reports the ratio and pass or fail for normal text, large text, and graphics and controls. It accepts an alpha value for transparent text and has a lightness slider to find the nearest passing shade. Each result has a permalink, which is handy for tickets.

Chrome DevTools. Google’s guide to making your website more readable shows three routes:

  • Inspect tooltip: hover over text in Inspect mode to see its ratio, with a warning sign when it fails.
  • Color Picker: click the text color in the Styles pane and open Contrast ratio. Lines on the color field mark the AA and AAA limits, and “Use suggested color” applies a passing shade.
  • CSS Overview: capture an overview and open Contrast issues for a list of every failing pair on the page.

Lighthouse, also in DevTools, flags contrast in its accessibility audit. Page scanners such as WAVE and Deque’s axe do the same across a whole site.

All of these read colors from the code. Text over a photo or gradient is where they are least reliable, so check those by eye with an eyedropper.

Color contrast failures in text on nonprofit sites

Poor color contrast is common everywhere. The WebAIM Million 2026 report, using data from February 2026, found low contrast text on 83.9% of the top million home pages. That was up from 79.1% in 2025. Each home page averaged 34 distinct instances.

On nonprofit and association sites, the same text failures come up again and again.

White text on a bright brand color. Orange, teal, light blue and lime buttons are the usual cases. A mid orange such as #F7941D gives 2.28:1 with white text.

Text over hero photos. A headline can pass on the dark part of a photo and fail on the sky. The W3C lists this as failure F83, background images that lack enough contrast with the text.

Placeholder text. Light gray hints inside form fields fail often. The W3C is direct: "This success criterion applies to text in the page, including placeholder text." Gray #A0A0A0 on white is 2.62:1.

Light gray body copy and captions. Designers pick a soft gray for footers, dates and image credits. Many land between 2.5:1 and 4:1.

Disabled buttons. These are exempt. Inactive controls do not need to meet contrast. But the active state still does. Give the disabled state a cue besides fading, so people know why they cannot click.

Non-text color contrast failures

WCAG 2.1 added 1.4.11, and it catches parts of the page that are not text.

Focus rings. The Understanding 1.4.11 page says a visible focus indicator needs enough contrast against the background next to it. A pale blue glow on white often fails. Our keyboard accessibility test shows how to spot it, and our post on the new WCAG 2.2 success criteria covers the stricter AAA rule, 2.4.13 Focus Appearance.

Form field borders. If the border is the only thing that shows where to type, it needs 3:1. A #CCCCCC border on white is 1.61:1.

Icons. An icon that carries meaning on its own, such as a status icon with no text, needs 3:1.

Charts. Lines in a line chart need 3:1 against the background. Pie slices need 3:1 against each other, unless labels or values give the same information. A data table or a written summary also works, and our guide to writing alt text covers long descriptions for charts.

Color-only links and errors. Under 1.4.1, links set apart from body text by color alone fail (F73). So do required fields or errors marked only in red (F81). The W3C’s Understanding 1.4.1 page accepts a 3:1 difference between link and body text as one fix (G183). An underline is simpler.

How to fix color contrast without losing the brand

Most brands survive accessibility work intact. A brand is a hue, a type style and a tone. It is rarely one exact shade used for every job. These are the fixes we use most.

Darken the shade for text. Keep the hue and lower the lightness. By our calculation, the same orange family passes at #A35400, at 5.49:1 on white.

Flip the text color. Black text on #F7941D is 9.21:1. Many bright brand colors work well with dark text.

Give each color a job. Bright shades can fill large areas, borders and decoration, where 3:1 or no rule applies. Darker shades carry text.

Brand color (example) White text on it Passing option
Orange #F7941D 2.28:1, fails Black text at 9.21:1, or darker #A35400 at 5.49:1
Light blue #00A3E0 2.87:1, fails Darker #006A9E at 5.91:1
Green #6CC24A 2.22:1, fails Darker #3B7A1A at 5.27:1

These pairs are illustrations we calculated with the WCAG formula. Check your own colors in a tool.

Put a layer under text on photos. A dark overlay, a solid text panel or a gradient behind the headline fixes most hero images.

Write the pairs into the design system. List each brand color with its approved text color and minimum size. Fixing it there corrects every page at once. Our post on brand consistency makes the same case from the marketing side.

APCA and WCAG 3, as of October 2026

APCA, the Accessible Perceptual Contrast Algorithm, is a different way to measure contrast. Its introduction on GitHub says Andrew Somers created it within the WCAG 3 visual contrast subgroup. It weighs font size and weight, and it gives different results when text and background swap. The same page calls it "the candidate method for contrast for WCAG 3."

The W3C’s September 10, 2026 Working Draft does not name it. Its text contrast requirement reads "@@[contrast measure to be determined]," and an editor’s note says "The contrast algorithm used in WCAG 3 is yet to be determined." According to accessibility consultant Adrian Roselli, APCA was in earlier drafts and was removed from the July 2023 draft.

So treat APCA as a proposal. You can use it as a design aid. Your colors still need to pass WCAG 2 ratios, because that is what contracts and current rules cite. Our post on the September WCAG 3 draft covers the rest of that draft.

Frequently Asked Questions

What is the minimum color contrast for WCAG AA?

4.5:1 for normal text and 3:1 for large text, under 1.4.3. Buttons, field borders, focus indicators, icons and chart parts need 3:1 under 1.4.11.

What counts as large text in WCAG?

At least 18 point, or 14 point bold. The W3C puts that at about 24px and 18.5px. WebAIM gives 18.66px for bold. Using 19px for bold clears both.

Is 4.49:1 close enough to pass?

No. The W3C says ratios should not be rounded, so anything under 4.5:1 fails for normal text.

Do logos have to meet color contrast rules?

No. Text in a logo or brand name has no contrast requirement. If the logo is also a link or button, make sure people can still find and use it.

Do disabled buttons need to pass contrast?

No. Inactive controls are exempt. Show the disabled state with something besides fading, and explain why the button is unavailable.

Does placeholder text count?

Yes. The Understanding page for 1.4.3 names placeholder text as covered, so it needs 4.5:1 like other text.

Which tools check color contrast?

The WebAIM Contrast Checker for single color pairs, and Chrome DevTools for live pages. Page scanners such as WAVE and axe flag low contrast across a site.

Do we need AAA color contrast at 7:1?

Most contracts and US rules point to Level AA. AAA is worth aiming for in body text where your palette allows it.

Will APCA replace the WCAG contrast ratio?

Not yet. As of October 2026, the WCAG 3 draft has not chosen an algorithm. Keep meeting WCAG 2 ratios.

Digital Matters

Web Design Desk