Color & Contrast Guidance

Learn how to choose colors that everyone can see, including people with low vision and color blindness.

Reading time: 8 minutes

Why Contrast Matters

Color contrast affectseveryone'sability to read and interact with content:

Good contrast isn't just accessible—it's better design for everyone.

WCAG Contrast Requirements

The Web Content Accessibility Guidelines specify minimum contrast ratios:

Minimum Contrast Ratios by Element Type
Element Type Minimum Ratio WCAG Criterion
Normal text (under 18pt / 24px) 4.5:1 1.4.3 Contrast (Minimum)
Large text (18pt+ or 14pt bold) 3:1 1.4.3 Contrast (Minimum)
UI components & graphics 3:1 1.4.11 Non-text Contrast
Enhanced Level AAA 7:1 / 4.5:1 1.4.6 Contrast (Enhanced)

What Counts as "Large Text"?

What Needs Contrast?

Testing Your Colors

Recommended Tools

Colour Contrast Analyser (CCA)

Desktop app with eyedropper. Test colors directly from your screen.

Download CCA

axe DevTools

Browser extension that scans entire pages for contrast issues.

Get axe DevTools

Figma Contrast Plugin

Check contrast while designing, before development.

Stark for Figma

How to Test

  1. Identify theforeground color(text or icon)
  2. Identify thebackground color(what's behind it)
  3. Enter both colors into a contrast checker
  4. Verify the ratio meets the requirement for that element type
  5. For gradients: test thedarkestforeground on thelightestbackground

Common Problems & Fixes

Problem 1: Light Gray Text

Gray text on white backgrounds is the most common failure.

Don't: 2.5:1 ratio

color: #999999;
background: #ffffff;

This gray text fails contrast requirements.

Do: 4.6:1 ratio

color: #767676;
background: #ffffff;

This gray text passes for normal text.

Problem 2: Placeholder Text

Most browser defaults for placeholder text fail contrast.

Don't

::placeholder {
 color: #aaaaaa;
}

Do

::placeholder {
 color: #767676;
}

Problem 3: Brand Colors That Fail

When your brand colors don't meet contrast requirements:

Problem 4: Focus Indicators

Custom focus styles must have 3:1 contrast against adjacent colors.

/* Good focus indicator */
:focus {
 outline: 3px solid #005EA2;
 outline-offset: 2px;
}

/* High contrast focus ring */
:focus-visible {
 outline: 2px solid #000000;
 box-shadow: 0 0 0 4px #ffffff, 0 0 0 6px #000000;
}

Color Blindness Considerations

Contrast ratios help withlightnessperception, but don't solve color blindness. Additional steps:

Color Blindness Simulation Tools

Quick Test

Print your design in grayscale. Can you still understand all the information? If not, you're relying too heavily on color.

Color & Contrast Checklist