WCAG Encyclopedia

Tool · Success criteria 1.4.3 and 1.4.11, plus the AAA result for 1.4.6

Colour check. Will people read it?

Pick a text colour and a background. You see the pair in a real layout, every threshold it passes or fails, and the nearest colour that would pass.

Your colours

Pick a text colour and a background. Everything below is drawn in those two colours and measured live.

Text colour
Background
Contrast ratio11.74 : 1

The contrast ratio compares how bright the two colours are. 1 : 1 means the colours are identical, so text in them is invisible; 21 : 1 is black on white, the most there is. The higher the number, the easier it is to read.

On the scale from 1 : 1 to 21 : 1, 11.74 : 1 is at or above 7 : 1: enough for every threshold.

Why the thresholds differ
  • Body text needs 4.5 : 1 (1.4.3, Level AA). That is any text below large size.
  • Large text needs 3 : 1 (1.4.3). Large means at least 24px, or 18.66px and bold. Bigger, heavier letters stay readable with less contrast.
  • At Level AAA, body text needs 7 : 1 (1.4.6), for people with moderately low vision.
  • Borders and icons need 3 : 1 (1.4.11): the edge of a field or checkbox, a focus ring or an icon, against what is next to it. You have to see that they are there, not read them.
  • PassesBody text, AA · 1.4.3Body text needs at least 4.5 : 1. This pair has 11.74 : 1.
  • PassesLarge text, AA · 1.4.3Large text needs at least 3 : 1. This pair has 11.74 : 1.
  • PassesBody text, AAA · 1.4.6Body text at AAA needs at least 7 : 1. This pair has 11.74 : 1.
  • PassesBorders and icons, AA · 1.4.11Borders and icons need at least 3 : 1. This pair has 11.74 : 1.

1.4.3 passes

Done well, done badly

Six mistakes we see most, each next to its fix. Load one into the colour check and try your own fix.

  • Pale grey on white

    Badly · 2.05 : 1. #B5B5B5 text on #FFFFFF.
    Opening hoursWell · 6.48 : 1. #5E5E5E text on #FFFFFF.

    Looks refined on a bright monitor and disappears on a phone in sunlight.

  • White on yellow

    Badly · 1.45 : 1. #FFFFFF text on #F8D17D.
    Opening hoursWell · 11.74 : 1. #1A1C1C text on #F8D17D.

    Yellows are light colours. Dark text works on them; white text never does.

  • Pastel link on white

    Badly · 1.76 : 1. #9CCADE text on #FFFFFF.
    Opening hoursWell · 7.14 : 1. #1F5E7A text on #FFFFFF.

    Keep the hue, drop the lightness. The link stays on brand and becomes readable.

  • Red on green

    Badly · 1.40 : 1. #D0312D text on #3A9A3A.
    Opening hoursWell · 8.19 : 1. #FFFFFF text on #245A24.

    Similar lightness, different hue. For many colour-blind readers the two become one.

  • Muted text in dark mode

    Badly · 2.08 : 1. #5A5B5F text on #2A2B2D.
    Opening hoursWell · 8.01 : 1. #C3C3BE text on #2A2B2D.

    Secondary text drifts towards the background. Lift it until it reads.

  • Soft red error message

    Badly · 2.28 : 1. #FF8A80 text on #FFFFFF.
    Opening hoursWell · 6.66 : 1. #A83226 text on #FFFFFF.

    A friendly coral feels gentle and fails as text. Errors must be the easiest thing to read.

What the numbers mean

Contrast is measured from 1 : 1, the same colour twice, to 21 : 1, black on white. The threshold you need depends on what the colour is doing.

  • 4.5 : 1

    Body text

    Anything people read below large size. Level AA, criterion 1.4.3. At AAA, criterion 1.4.6 asks for 7 : 1.

  • 3 : 1

    Large text

    At least 24px, or 18.66px when bold. Bigger letters stay readable with less contrast.

  • 3 : 1

    Controls and graphics

    Field borders, focus rings, icons and chart lines, measured against what sits next to them. Criterion 1.4.11.

What a ratio can’t tell you

Passing the threshold is the minimum. These still need a human look.

  • Thin and small fontsA hairline weight at 4.5 : 1 can still be hard to read. The ratio assumes ordinary strokes.
  • Text over imagesA photo has hundreds of background colours. Check the lightest part behind the text, or add a solid backing.
  • Hover, focus and disabled statesEach state is a new pair of colours. Check them all, not just the resting one.
  • Colour as the only signalTwo colours can both pass and still be told apart only by hue. Criterion 1.4.1 asks for a second cue, such as an icon or underline.