Marketing

WCAG Contrast Ratios: 4.5:1, 3:1 and 7:1 Explained

Which WCAG 2.2 contrast ratio applies to text, large text, icons and input borders, the luminance formula worked by hand, and why 4.48:1 fails.

By TooleemPublished Facts checked

Short answer

WCAG 2.2 uses three numbers. 4.5:1 is the Level AA minimum for normal text. 3:1 is the AA minimum for large text (24px, or about 18.5px bold) and, under a separate criterion, for icons, input borders, focus indicators and chart lines. 7:1 is the stricter AAA level for normal text. The thresholds are hard: a computed 4.48:1 fails 4.5:1, because WCAG says the ratio must not be rounded.

Do the calculation

Color Contrast Checker

Paste two colours and get the exact ratio with AA and AAA results for normal and large text.

Open the tool
On this page
  1. Which ratio applies to what
  2. Working the formula by hand
  3. Why 4.48:1 is a fail
  4. Non-text contrast: the other 3:1
  5. Where no minimum applies
  6. Five failures that pass a quick glance
  7. Fixing a brand colour that fails
  8. What about WCAG 3 and APCA?

Which ratio applies to what

Most explanations stop at text. Two success criteria are involved, and 3:1 appears in both of them for different things:

WCAG 2.2 contrast thresholds by element
ElementMinimum ratioSuccess criterionLevel
Normal text (under 24px, or under ~18.5px bold)4.5:11.4.3 Contrast (Minimum)AA
Large text (24px+, or ~18.5px+ bold)3:11.4.3 Contrast (Minimum)AA
Icons, input borders, focus indicators, chart lines needed to understand the content3:11.4.11 Non-text ContrastAA
Normal text7:11.4.6 Contrast (Enhanced)AAA
Large text4.5:11.4.6 Contrast (Enhanced)AAA
Large text is defined as at least 18 point, or 14 point bold. W3C converts these to approximately 24px and 18.5px (1pt = 1.333px).

Level AA is what accessibility policies and procurement rules usually point to. AAA is not expected for whole sites; W3C itself notes that AAA cannot be met for all content.

Working the formula by hand

The ratio compares the relative luminance of the two colours, a measure of how bright each looks to the eye, from 0 (black) to 1 (white). Here is the full calculation for the dark teal Tooleem uses for text on light backgrounds, #0B7A70, against white.

Step 1: convert each channel to a 0–1 value

R = 11 ÷ 255 = 0.0431 G = 122 ÷ 255 = 0.4784 B = 112 ÷ 255 = 0.4392

Step 2: linearise each channel

Screens store colour with a gamma curve, so each value is turned back into linear light. Values at or below 0.04045 are divided by 12.92; everything above goes through the power formula:

For a value c above 0.04045

linear = ((c + 0.055) ÷ 1.055) ^ 2.4

R: 0.0431 → 0.0033 G: 0.4784 → 0.1946 B: 0.4392 → 0.1620

Red is just above the 0.04045 cut-off, so even it uses the power formula. Before May 2021 the WCAG definition said 0.03928; W3C changed it and notes that the difference has no practical effect.

Step 3: weight the channels

The eye is far more sensitive to green than to blue, and the weights say so:

L = 0.2126 × 0.0033 + 0.7152 × 0.1946 + 0.0722 × 0.1620 = 0.1516

White has a luminance of exactly 1.

Step 4: the ratio

ratio = (L lighter + 0.05) ÷ (L darker + 0.05) = (1 + 0.05) ÷ (0.1516 + 0.05) = 5.21

So #0B7A70 on white is 5.21:1: it passes AA for all text sizes and fails AAA for normal text. The 0.05 added to both sides models the light a screen reflects; it is why the scale runs from 1:1 to 21:1 rather than to infinity.

Note

Notice how much of the result comes from green: 0.7152 × 0.1946 is 0.139 of the 0.152 total. That is why a saturated blue such as #0000FF reaches 8.59:1 on white while a bright green that looks equally strong can fail.

Why 4.48:1 is a fail

Many checkers display one or two decimals, and many people round in their head. WCAG is explicit that the thresholds must be compared with the unrounded value: its own example is that 4.499:1 does not meet 4.5:1. Neighbouring greys show how narrow the line is:

Greys on a white background, around the 4.5:1 line
Text colourRatio on #FFFFFFNormal text, AA (4.5:1)
#7575754.60:1Pass
#7676764.54:1Pass
#7777774.47:1Fail
#7878784.41:1Fail
#777777 computes to 4.478:1. A display that rounds to one decimal shows “4.5”, and it still fails.

#767676 is the lightest neutral grey that passes on pure white, which is why it turns up in so many design systems. It only works on pure white, though, as the next sections show.

Non-text contrast: the other 3:1

Success criterion 1.4.11, added in WCAG 2.1, asks for 3:1 against adjacent colours for two kinds of non-text content:

  • Visual information needed to identify a control and its state: the border of a text field when the border is the only thing that shows where the field is, a checkbox outline, the indicator that shows a toggle is on, and the focus indicator when the control has keyboard focus.
  • Parts of graphics needed to understand the content: a single-colour icon with no text label, the lines in a line chart, the slices of a pie chart when you need to tell them apart.

“Adjacent” means what touches the element. For a text field with a white inside, a grey border and a white page around it, the border is measured against the white page.

Worked example

The pale input border

A light grey border such as #D1D5DB on white measures 1.47:1. If that border is the only visual sign of the field, it fails 1.4.11. Options: darken the border to at least 3:1 (#949494 reaches 3.03:1), or give the field a visible label and a background fill that already identify it. W3C is clear that a boundary is only required when nothing else shows that the control is there.

Two exceptions apply: inactive (disabled) components, and controls whose appearance is left entirely to the browser. Once you restyle a browser control, the exception is gone.

Where no minimum applies

Criterion 1.4.3 names three exceptions for text. They are narrower than they are often taken to be:

Text with no contrast requirement under WCAG 1.4.3, and the common misreadings
ExceptionWhat it coversWhat it does not cover
LogotypesText that is part of a logo or brand nameA slogan, menu or button set in the brand colour
Inactive componentsThe label of a disabled button or fieldPlaceholder text in an active field: W3C says placeholders are covered
Incidental textPure decoration, text not visible to anyone, text inside a photo with significant other contentA caption or headline placed over a photo

Five failures that pass a quick glance

  1. Placeholder grey. A popular placeholder grey, #9CA3AF, measures 2.54:1 on white. Placeholder text is in scope, so it needs 4.5:1. #6B7280 (4.83:1) passes.
  2. The same grey on a tinted card. #767676 passes on white (4.54:1) but drops to 4.12:1 on a light grey card such as #F3F4F6. Test each text colour on every background it actually sits on.
  3. A light brand colour used for text. Bright turquoise #1ED4C5 is 1.86:1 on white, unusable for text there, yet 9.58:1 on a dark navy such as #0F172A. A brand colour is not good or bad; the pairing is.
  4. Text over images and gradients. Measure against the lightest part of the background behind light text (or the darkest part behind dark text), not the average. An overlay or a solid band behind the text fixes most cases.
  5. Hover, focus and visited states. WCAG applies to text shown on hover or focus as well. A link that turns pale on hover has to pass in its hover colour too.

Fixing a brand colour that fails

Keep the hue, lower the lightness, and re-measure. The table darkens #1ED4C5 by scaling its three channels down in 5% steps and measures each result against white:

Darkening #1ED4C5 until it passes on white
Channels keptColourRatio on whiteUse
100%#1ED4C51.86:1Decoration only
80%#18AA9E2.88:1Decoration only
75%#169F943.27:1Large text, icons, borders
65%#138A804.22:1Large text, icons, borders
60%#127F764.86:1All text (AA)
45%#0D5F597.50:1All text (AAA)
Scaling channels is one method of many; any method works as long as the final colour is measured. The 3:1 rows meet AA for large text and for non-text elements, not for body text.

This is the trade-off behind Tooleem’s own palette: the bright turquoise is used on dark backgrounds, and a darker teal (#0B7A70, 5.21:1) carries text on light ones.

What about WCAG 3 and APCA?

WCAG 2.2, a W3C Recommendation since October 2023, is the version policies point to today. WCAG 3.0 is still a Working Draft. Contrast methods discussed for it, such as APCA, can be interesting for design work, but passing them is not a substitute for meeting the 2.x ratios above.

Do the calculation

Color Contrast Checker

Paste two colours and get the exact ratio with AA and AAA results for normal and large text.

Open the tool

Tools used in this guide

Sources

The figures and rules in this guide come from these documents.

  1. Web Content Accessibility Guidelines (WCAG) 2.2W3CSuccess criteria 1.4.3, 1.4.6 and 1.4.11; the definitions of contrast ratio, relative luminance and large-scale text.
  2. Understanding Success Criterion 1.4.3: Contrast (Minimum)W3C Web Accessibility InitiativeNo rounding (4.499:1 fails), the 0.03928 to 0.04045 change, placeholder text in scope, pixel equivalents of large text.
  3. Understanding Success Criterion 1.4.11: Non-text ContrastW3C Web Accessibility InitiativeAdjacent colours, when an input border is required, focus indicators, inactive components.
  4. Understanding Success Criterion 1.4.6: Contrast (Enhanced)W3C Web Accessibility InitiativeThe AAA thresholds of 7:1 and 4.5:1.

Facts checked

All guides