Guides

Creating Accessible Text Colors: Design System Guide

Alexander Xrayd

Alexander Xrayd

Accessibility Expert

Read time

4 min

Published

Oct 27, 2025

Person working with tablet and color swatches on desk

Colors are a big part of the experience when designing accessible products. At the same time, they're often the part of the brand hardest to compromise on. Many designers fear accessibility requirements will limit their creativity.

The truth? A well-designed color system that meets WCAG actually looks better than one that doesn't. Contrast creates visual hierarchy. Clear color differences make interfaces easier to understand for everyone.

In this guide, we show how to build a color system that meets legal requirements while strengthening your brand.

Start with a color inventory

Before you can improve anything, you need to know what you have. Collect all colors used in the product today and sort them by use:

Background colors: Main background, secondary surfaces, cards, modals
Text colors: Headings, body text, labels, placeholder text
Interactive colors: Buttons, links, hover states, focus indicators
Semantic colors: Error (red), warning (yellow), success (green), info (blue)

Then test contrast on your primary combinations. Use tools like WebAIM Contrast Checker or Stark plugin for Figma. Document results in a table – you'll need it later.

Build color scales with built-in contrast

The smartest solution for accessible colors is building scales from the start. Instead of having a single blue color, create a scale from 50 (lightest) to 900 (darkest).

The key is designing scales so certain combinations always work. For example:

Text in 900 against background in 50-200: Always at least 4.5:1
Text in 50 against background in 700-900: Always at least 4.5:1
Large text (18px+) has lower requirements: 3:1 is enough

Tools like Tailwind CSS already have color scales with this in mind. Use them as starting point and adapt to your brand.

A color system with built-in contrast rules eliminates guessing and makes it impossible for the team to choose inaccessible combinations.

Maintain brand tonality

'But our primary color doesn't meet 4.5:1!' – This is a common objection, but it has solutions.

If your brand color is too light for text, use it differently:

As background color with dark text on top
As accent on larger areas where contrast isn't needed (decorative elements)
In a darker shade for interactive elements

Spotify is a good example. Their iconic green (#1DB954) has too low contrast for white text. Solution? They use black text on green buttons. Simple, effective, still recognizable.

Alternatively, create an 'accessible variant' of the color that's close to original but meets requirements. Often minimal saturation or lightness adjustment is enough.

Don't forget dark mode

Dark mode isn't just a trend – it's an accessibility requirement for many users with light sensitivity or migraines. But it introduces new challenges:

White text on black background can be too harsh. Use off-white (#E5E5E5) instead of pure white (#FFFFFF).
Color saturation appears stronger on dark backgrounds. Mute your accent colors slightly.
Elevations (shadows) don't work on dark surfaces. Use lighter background shades to create depth.

Test contrast in both modes. It's common for a combination that works in light theme to fail in dark – or vice versa.

Implementation in code

When the color system is defined, document it as design tokens. In CSS it might look like:

--color-text-primary: #1a1a1a;
--color-text-secondary: #666666;
--color-text-on-primary: #ffffff;

Use semantic names (text-primary, background-surface) instead of color names (black, gray-500). This makes theme switching easier and ensures the right color is always used in the right context.

Add linting rules that warn if someone uses hardcoded color values instead of tokens.

Test your site's accessibility

Free scan, no signup required

WCAG 2.1 AA check
2-minute scan
Actionable report

Frequently Asked Questions

What's the difference between AA and AAA for contrast?+
AA requires 4.5:1 for normal text and 3:1 for large text. AAA requires 7:1 and 4.5:1 respectively. Most laws require AA, but AAA is recommended for best readability.
Must decorative elements also have contrast?+
No, purely decorative images and graphics that don't convey information are exempt. But be careful – if the element helps users understand the interface, it's not considered decorative.

Related Articles

View all
Color swatches and design sketches
Legal5 min

Color Contrast and WCAG: Complete Designer's Guide

Read article
Computer screen with code and checklist
Tech5 min

The Ultimate WCAG 2.2 Checklist for Developers (AA & AAA)

Read article
Person using laptop with accessible interface
Guides6 min

What is Web Accessibility? Complete Beginner's Guide

Read article
Screen showing SEO analysis and graphs
Tips4 min

Web Accessibility and SEO: How They Work Together

Read article