Find a course

Module 5: Color in PracticeLesson 10 of 1213 min

Accessible Color and Contrast

Design for everyone: meet WCAG contrast ratios, avoid relying on color alone, and support people with color vision deficiency and low vision.

Step 1 of 13Learn

Who is affected

Color choices decide whether some people can use your design at all.

  • Color vision deficiency (CVD) affects roughly 1 in 12 men and 1 in 200 women of Northern European ancestry, and somewhat fewer in other populations. The most common types reduce the ability to tell red from green. Rarer types affect blue and yellow, and very few people see no color at all.
  • Low vision affects many people, especially as they age. Lens changes reduce contrast sensitivity, so pale gray text that looks elegant to a 25-year-old designer can be nearly invisible to a 70-year-old reader.
  • Situational limits affect everyone: bright sunlight on a phone screen, a dim projector, a cheap monitor or a grayscale printout.

The good news: the same handful of practices helps all of these groups. Strong value contrast, never relying on color alone, and clear labels make designs easier for everyone, not just for people with a diagnosis.

Accessibility is also a legal requirement in many places. Public-sector websites in the US, the EU and many other regions must meet accessibility standards, and private companies face growing expectations and legal risk. The common reference is the Web Content Accessibility Guidelines (WCAG) from the World Wide Web Consortium (W3C).

Step 2 of 13Practice · Chart

Color vision deficiency, Northern European ancestry

Tap the group in which color vision deficiency is far more common.

Tap the bar that answers the question, then press Check.

Color vision deficiency, Northern European ancestryBar chart with 2 categories: Men: 8.3%; Women: 0.5%.0%2%4%6%8%10%MenWomen8.3%0.5%
About 1 in 12 men and 1 in 200 women; rates are somewhat lower in other populations.
Color vision deficiency, Northern European ancestry
ItemShare affected
Men8.3%
Women0.5%

Step 3 of 13Practice · True or false

Pale gray text on a white background that looks fine to the designer will look equally clear to most older readers.

Step 4 of 13Learn

Contrast ratios explained

WCAG measures text legibility with a contrast ratio between text color and background color. The ratio compares their relative luminance, a measure of perceived brightness from 0 (black) to 1 (white):

contrast ratio = (L_lighter + 0.05) ÷ (L_darker + 0.05)

The 0.05 accounts for ambient light reflecting off the screen. The result runs from 1:1 (identical colors) to 21:1 (black on white).

The key thresholds (WCAG 2):

LevelNormal textLarge text (about 24 px regular or 18.66 px bold and up)
AA (the common legal target)4.5:13:1
AAA (enhanced)7:14.5:1

WCAG also asks for at least 3:1 for meaningful non-text elements such as icons, form field borders and chart lines (non-text contrast).

Luminance is not the average of the RGB numbers. The eye is far more sensitive to green than to blue, so luminance weights the channels roughly 21% red, 72% green and 7% blue after converting them to linear light. That is why pure yellow (#FFFF00) is very bright and pure blue (#0000FF) is very dark, even though each has a channel at 255.

You will rarely calculate this by hand: free contrast checkers do it instantly. But knowing the thresholds lets you judge quickly whether a pair is in the right range.

Step 5 of 13Try the calculator

Contrast ratio checker

Enter the RGB values (0–255) of a text color and a background color. Results match official checkers closely; they may differ in the second decimal for very dark colors because this calculator uses a simplified formula.

Contrast ratio (to 1)
7.46
Passes AA for normal text? (1 = yes, 0 = no)
1
Passes AA for large text? (1 = yes, 0 = no)
1

Step 6 of 13Practice · Diagram

Contrast ratios against WCAG thresholds

Which marker looks almost fine but just misses the AA minimum for body text?

Tap the shape that answers the question, then press Check.

Contrast ratios against WCAG thresholdsScale: #999 on white, #777 on white, #595959 on white, Black on white.2.557.51012.51517.5202.85 :1#999 on white4.48 :1#777 on white7 :1#595959 on white21 :1Black on white
#999 on white

Elegant-looking pale gray that fails for text.

#777 on white

Just below 4.5: fails AA for body text.

#595959 on white

Meets AAA for body text.

Black on white

The maximum possible ratio.

Step 7 of 13Practice · Work it out

A text color has relative luminance 0.10 and its background 0.80. What is the contrast ratio (the "x" in x:1)? Round to two decimals.

Step 8 of 13Tap to reveal

Types of color vision deficiency

  1. Deuteranomaly and deuteranopia

    Reduced or missing sensitivity of the medium-wavelength (green) cones. Deuteranomaly is the most common type overall. Reds, greens, browns and oranges can look similar.

  2. Protanomaly and protanopia

    Reduced or missing sensitivity of the long-wavelength (red) cones. Reds look darker and can be confused with greens, browns or even black.

  3. Tritanomaly and tritanopia

    Rare problems with the short-wavelength (blue) cones. Blues and greens, and yellows and pinks or violets, can be confused.

  4. Achromatopsia

    Very rare complete color blindness, often with light sensitivity and reduced sharpness. The world appears in shades of gray.

  5. What this means for design

    Hue differences alone are unreliable. Differences in value, plus labels, icons, patterns and position, work for every type.

Step 9 of 13Learn

Never rely on color alone

WCAG has a second color rule that is just as important as contrast: color must not be the only way information is conveyed. If meaning depends only on hue, someone who cannot distinguish those hues loses the information.

Common failures and fixes:

  • Form errors shown only by a red border. Add an icon and a text message: "Enter a valid email address."
  • Charts with a color-only legend, where red and green lines look identical to many readers. Label lines directly, use different line styles or markers, and choose colors that differ in value.
  • Links in body text shown only by color. Add an underline, or ensure the link color has strong contrast with the surrounding text and changes visibly on focus and hover.
  • Status dots (green for online, red for offline). Add text labels or distinct shapes.
  • "Click the green button." Refer to the label instead: "Select Continue."

A quick self-check: print the design in grayscale or turn on a grayscale filter. Can you still tell every state, category and link apart? If not, add a second cue such as text, an icon, a pattern, position or underlining.

These redundant cues help everyone. People skim faster when a red error also has an icon, and a chart with direct labels is quicker to read than one that sends the eye back and forth to a legend.

Step 10 of 13Practice · Spot the mistake

A designer describes a sign-up form. Click the choices that rely on color alone.

Step 11 of 13Note

Step 12 of 13Practice · What would you do?

What would you do?

A dashboard shows server status with small dots: green for running, red for stopped. A colleague with red-green color vision deficiency says they cannot tell which servers are down. What is the best fix?

Step 13 of 13Practice · Choose one

Under WCAG 2 level AA, what is the minimum contrast ratio for normal-sized body text?