Guide

WCAG Color Contrast: AA vs AAA Ratios With Examples

Short answer: WCAG measures contrast as a ratio from 1:1 (identical colours) to 21:1 (black on white). For level AA, normal text needs at least 4.5:1, large text at least 3:1, and interface components such as icons and input borders at least 3:1. Level AAA asks for 7:1 for normal text and 4.5:1 for large text. Enter any two colours in the WCAG Color Contrast Checker to see the ratio and which levels pass.

Why contrast matters

Enough contrast helps people with low vision, and also anyone reading a phone in bright sunlight or a tired person at the end of a long day. It is also one of the easiest accessibility problems to measure, which is why it is the first thing many audits check.

The thresholds

Level Normal text Large text UI components and graphics
AA 4.5:1 3:1 3:1
AAA 7:1 4.5:1 (no separate AAA level)

Large text means 18 pt (24 CSS pixels) or larger, or 14 pt (about 18.67 px) and bold or larger. UI components are things like the border of an input field or an icon that carries meaning.

Two exemptions are worth knowing: text that is part of a logo, and inactive (disabled) controls have no contrast requirement. The W3C's own explanation of success criterion 1.4.3 spells this out, including that a low-contrast logo chosen freely by the author, rather than required by brand guidelines, is not automatically exempt.

Real examples on a white background

Colour Ratio Result
#1f2937 (dark grey) 14.67:1 Passes every level
#767676 4.54:1 Passes AA for normal text; fails AAA for normal text. It is the lightest grey that passes AA on white
#777777 4.47:1 Fails AA for normal text, though it looks identical to the eye
#999999 2.84:1 Fails every level, even for large text and UI components

The #767676 versus #777777 pair is the point: one step in the hex value flips a pass into a fail. You cannot judge this by eye. The checker shows the ratio rounded down to two decimals, so a value like 4.499 never appears as a pass, which is the safe direction.

What the checker does with transparency

A colour with transparency is blended with what is behind it before measuring: a semi-transparent text colour over the background, and a transparent background over white. A real page may have something else behind it, so test the real combination. Gradients and images behind text cannot be measured, so check the lightest and darkest parts separately.

How to check a WCAG contrast ratio with the contrast checker

  1. Open the WCAG Color Contrast Checker.
  2. Enter or pick a text colour and a background colour.
  3. Read the ratio and the AA/AAA result for normal text, large text and UI components.
  4. Use Swap colors to test the reverse pairing. Swapping the two colours of one pair gives the same ratio, but a dark theme normally uses different colours, so check each pair your dark theme really uses.
  5. Look at the sample below the table to see the pair at normal and large size.

Need the colour in a different notation first? Use the Color Converter. To turn a size in points into pixels or rem for the "large text" rule, use the PX to REM Converter (the px to rem conversion guide explains the maths).

What a pass does not prove

  • The ratio uses the WCAG 2.x formula. It does not model newer perceptual methods, font weight or thin strokes, so a pass is a minimum, not proof that text is comfortable to read.
  • currentcolor, inherit and similar keywords are rejected because they depend on the page, and newer colour spaces such as oklch() are not read. Convert to HEX first.
  • Size, weight, spacing and the surrounding design matter too.

Frequently asked questions

What contrast ratio does WCAG AA require? 4.5:1 for normal text, 3:1 for large text and for UI components.

What is the difference between AA and AAA? AAA is stricter: 7:1 for normal text and 4.5:1 for large text.

Is #767676 on white accessible? It measures 4.54:1, so it passes AA for normal text. It is the lightest grey that does.

Do disabled buttons and logos need contrast? No. Inactive controls and logotype text are exempt.

Does passing the checker guarantee readability? No. It is the measurable minimum, not a guarantee.

Related tools and guides

Sources and further reading