Aalamey.com

Home › Guides › Digital skills guides

Color Contrast Explained: Making Text Readable

By the Aalamey editorial team · Published 6 November 2026 · Last reviewed 6 November 2026 · 4 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.

Common brand colors measured against white

These ratios were calculated with the WCAG formula. They show how often popular "bright" colors fail for body text and how a darker shade of the same hue fixes it.

Color on whiteContrast ratioNormal text (AA)
Bright blue #3b82f63.68:1Fail (large text only)
Deeper blue #1d4ed86.70:1Pass
Amber #f59e0b2.15:1Fail
Dark amber #b453095.02:1Pass
Sky blue #0ea5e92.77:1Fail
Dark sky blue #0369a15.93:1Pass
Green #22c55e2.28:1Fail
Dark green #15803d5.02:1Pass
Red #ef44443.76:1Fail (large text only)
Dark red #b91c1c6.47:1Pass

How to fix a failing color

Keep the same hue and make the color darker for text on a light background, or lighter on a dark background. Changing lightness, not hue, preserves the feel of your brand while meeting the ratio. Bright colors can still be used for large headings, icons and decoration where the lower 3:1 threshold applies, as long as the meaning is not carried by color alone.

A simple testing workflow

  1. List the text and background colors in your design.
  2. Check each pair with a contrast tool.
  3. Fix failures by adjusting lightness.
  4. Re-check hover, focus, disabled and error states.
  5. Test again in dark mode and on a real phone outdoors.

Frequently asked questions

Is a 4.5:1 ratio a legal requirement?

Many accessibility laws and procurement rules refer to WCAG 2.x level AA, which includes 4.5:1 for normal text. Check the rules that apply to your country and sector.

Do logos need to meet contrast ratios?

Text that is part of a logo or brand name is exempt from the minimum contrast requirement, but the rest of your page is not.

Does decorative text have to pass?

Purely decorative content and inactive controls are exempt. If the text carries information or can be used, it should meet the ratio.

This guide is general information, not legal, HR, financial or professional advice. See our disclaimer.

More guides