Aalamey.com

Home › Guides › Color Contrast Explained: Making Text Readable

Color Contrast Explained: Making Text Readable

By the Aalamey editorial team · Published 6 November 2026 · Updated 6 November 2026 · 2 min read

What contrast ratios mean, the WCAG pass levels for text and interface elements, worked examples and practical design tips.

Pale grey text on a white background may look elegant on a designer's monitor, but for many readers it is hard or impossible to read. Contrast ratios give a simple, objective way to check whether your colours work.

What is a contrast ratio?

A contrast ratio compares the brightness of two colours, such as text and its background. It is written from 1:1 (no difference, for example white on white) to 21:1 (the maximum, black on white).

The calculation in brief

Each colour is converted to a value called relative luminance, which weights red, green and blue by how bright they appear to the human eye (green counts most, blue least). The ratio is then:

(lighter luminance + 0.05) ÷ (darker luminance + 0.05)

You do not need to do this by hand, but it shows why two colours that look different in hue can still have poor contrast.

The WCAG targets

The Web Content Accessibility Guidelines (WCAG) set minimum ratios:

ContentLevel AALevel AAA
Normal text4.5:17:1
Large text3:14.5:1
Interface parts such as buttons and form borders3:1–

Large text means at least 24 px (18 pt), or at least about 18.66 px (14 pt) when bold. Most legal accessibility requirements point to level AA.

Worked examples

  • Black (#000000) on white: 21:1, passes everything.
  • Grey #767676 on white: about 4.54:1, just passes AA for normal text.
  • Grey #777777 on white: about 4.48:1, narrowly fails AA for normal text.
  • Light grey #AAAAAA on white: roughly 2.3:1, fails.

Notice how a tiny change in a grey value crosses the pass line. That is why checking with a tool is better than judging by eye.

Practical design tips

  1. Check every text colour, including placeholder text, captions and links.
  2. Do not rely on colour alone to convey meaning. Add an icon, underline or label, because some people cannot distinguish certain colours.
  3. Test states, such as hover, focus, disabled and error messages.
  4. Check both light and dark themes if your site has them.
  5. Be careful with text over images. Add a solid or semi-transparent layer behind the text, then measure the contrast against it.
  6. Avoid very thin fonts in light colours, since thin strokes lower the effective contrast.

Who benefits?

People with low vision or colour blindness benefit most, but good contrast also helps everyone reading in bright sunlight, on a dim screen or when tired.

Where to learn more

The official guidance is published by the World Wide Web Consortium at w3.org/TR/WCAG21.

Our contrast checker calculates the ratio, shows pass or fail for each level and previews your text on the background, all inside your browser.

Try it yourselfFree, private and runs in your browser.
Check your color contrast

More guides