Design4 min

Colour contrast for accessibility: WCAG rules made simple

Colour contrast accessibility explained: WCAG contrast ratios for text, large text and UI components, how to test contrast, and fixes that keep your brand.

Saurabh YadavFounder, Design Studio by Saurabh
DesignColour contrastWCAGAccessibility
Share

Low contrast is one of the most common accessibility problems on the web, and one of the easiest to fix. Light grey text on white might look elegant in a design file, but on a phone in sunlight, or for someone with low vision, it's simply unreadable.

The WCAG contrast rules

The Web Content Accessibility Guidelines (WCAG) define minimum contrast ratios between foreground and background colours.

WhatLevel AALevel AAA
Normal text4.5:17:1
Large text (about 24px regular, or about 18.5px bold)3:14.5:1
UI components and meaningful graphics3:1Not defined

Ratios range from 1:1 (no contrast) to 21:1 (black on white). Level AA is the usual target for products and is referenced by many accessibility laws.

Note

"Large text" in WCAG is defined as 18 point or 14 point bold, which is roughly 24px regular or 18.5px bold on the web.

What counts as a UI component

The 3:1 rule for non-text contrast covers things people need to see to use the interface:

  • Input borders and checkboxes.
  • Icons that carry meaning without a text label.
  • Focus indicators.
  • The visible boundary of buttons that are only outlined.
  • Parts of charts that carry information.

Disabled controls and pure decoration are exempt.

How to check contrast

  • In Figma: use a contrast checker plugin on text and component layers.
  • In the browser: developer tools show contrast ratios when you inspect text.
  • Online checkers: paste two colours and get the ratio.
  • In reality: look at your design on a cheap phone, at low brightness, outdoors.

Fixing contrast without losing your brand

Brand colours often fail contrast, especially bright yellows, light greens and pastel blues. You don't need to abandon them.

  1. Create darker and lighter shades of each brand colour and use the accessible shade for text.
  2. Use bright brand colours for backgrounds and accents, with dark text on top.
  3. Pair brand colours with near-black or white rather than mid-tones.
  4. Build contrast into tokens, so text tokens always pass. See design tokens explained.

Tip

Check every colour pairing once, when you build the palette, and document which combinations are approved. It's far easier than checking every screen later.

Common contrast mistakes

MistakeFix
Light grey placeholder or helper textDarken it to pass 4.5:1
Text over photosAdd an overlay or a solid background
Colour as the only signal (red = error)Add icons and text
Faint input bordersMake borders at least 3:1
Dark mode with pure white on pure blackSoften slightly, but keep ratios passing

For dark themes specifically, see designing dark mode properly. For the bigger picture, accessibility is UX.

Work with us

Want an expert review? Our UX audit services find usability, accessibility and conversion issues and rank the fixes by impact.

FAQ

What is the WCAG contrast ratio for normal text?

For WCAG Level AA, normal text needs a contrast ratio of at least 4.5:1 against its background. Level AAA requires 7:1.

What contrast ratio do buttons and icons need?

WCAG requires at least 3:1 for the visual information needed to identify user interface components and their states, such as input borders, icons without labels and focus indicators. Text inside buttons still needs 4.5:1, or 3:1 if it's large.

Does placeholder text need to meet contrast requirements?

Yes. Placeholder text is still text, so it should meet 4.5:1. Better still, don't rely on placeholders for important information; use visible labels.

Key takeaways

  • Normal text needs 4.5:1 and large text 3:1 for WCAG AA.
  • UI components and meaningful icons need 3:1.
  • Test in tools and on real, cheap screens in real light.
  • Keep brand colours by creating accessible shades and approved pairings.
  • Never rely on colour alone to communicate meaning.

What to do next

Run a contrast check on your sign-up and checkout screens today, starting with helper text and input borders. If you'd like an accessibility review of your product, get in touch.

Saurabh Yadav's Memoji

Written by

Saurabh Yadav

Founder of Design Studio by Saurabh, a UI/UX design studio in India. We design apps and websites that feel effortless, from research to shipped pixels. Most recently: Pukaar.ai, as seen on Shark Tank India, and the Demerara Bank app.

Keep reading

All articles →