AccessibilityApr 15, 2026 · Updated Oct 14, 2026 · 5 min read

How to Build an Accessible Color Palette (2026)

Which colors pass WCAG for text, which pass only for borders and icons, and which pairs fail once they sit on a tinted card. We measured all of Tailwind CSS 4.3.3's default palette against white and near-black, and simulated a red and green pair for color-blind readers.

Ink, water, abstract — illustrating How to Build an Accessible Color Palette (2026)
🎨
Try the Accessible Palette Generator
Free, no signup
→
DG
Derek Giordano
Designer & Developer
In this guide
01What WCAG Actually Requires02Which Tailwind Shades Pass03Test the Pairs You Actually Use04Do Not Rely on Color Alone05Why the Minimums Are a Floor06Turning the Palette Into Tokens

What WCAG Actually Requires

Contrast rules in WCAG 2.2 differ by what the color is doing, and the most common palette mistake is applying the text rule everywhere or nowhere:

What it colorsMinimum (AA)Success criterion
Body text and small labels4.5:1 against its background1.4.3 Contrast (Minimum)
Large text (24 px, or 18.66 px bold)3:11.4.3
Text inside a button or badge4.5:1 against the button fill1.4.3
Button outlines, input borders, focus rings, icons that carry meaning3:1 against what is next to them1.4.11 Non-text Contrast
Links told apart from body text by color alone3:1 between link and text color, plus an underline or other cue on hover and focus1.4.1 Use of Color (technique G183)
Enhanced level (AAA)7:1 for text, 4.5:1 for large text1.4.6 Contrast (Enhanced)

In the United States, the Justice Department's 2024 rule points state and local government sites at WCAG 2.1 AA, and the European Accessibility Act has applied to many consumer services since June 28, 2025, through the harmonized standard EN 301 549; our contrast guide covers the dates and the formula.

Which Tailwind Shades Pass

Shade numbers do not map to contrast. We took every color in Tailwind CSS 4.3.3's default palette, converted it to the sRGB value a standard screen shows (with CSS gamut mapping, since many v4 colors are defined beyond sRGB) and measured it against white and against neutral-950 (#0a0a0a) with culori 4.0.2:

HuesText on white (4.5:1) fromText on neutral-950 up toUI parts on white (3:1) from
slate, gray, zinc, neutral, stone, mauve, mist, taupe500400500
indigo500400400
violet600400500
red, blue, purple, fuchsia, pink, rose, olive600500500
orange, amber, lime, green, emerald, teal, cyan, sky700600600
yellow700600700

The 500 step alone ran from 1.92:1 on white (yellow) to 5.10:1 (mauve), so "use the 600s for text" is wrong for half the palette in one direction or the other. Warm and green hues need a step darker than blue and red to carry text on white; on a dark background the same hues can go a step lighter. Our shades and tints guide shows why: those hues are lighter at the same step number.

Test the Pairs You Actually Use

A color that passes on white can fail on the off-white card it actually sits on. Tailwind's blue-600 measured 5.25:1 on white, 5.01:1 on slate-50, 4.79:1 on slate-100 and 4.26:1 on slate-200, where body text fails AA. List every text color against every background it appears on and fill in the ratios; the Palette Contrast Matrix builds that grid, and the Contrast Batch Checker runs a list of pairs at once. Truncate ratios rather than rounding them, or a 4.47:1 pair will read as 4.5 and pass on paper.

Do Not Rely on Color Alone

Jennifer Birch's review of large population surveys (Journal of the Optical Society of America A, 2012, retrieved through PubMed) puts inherited red-green color deficiency at about 8% of men and 0.4% of women of European descent, and 4% to 6.5% of Chinese and Japanese men. We simulated what that does to a classic error and success pair, Tailwind's red-600 and green-600, with the Machado (2009) model in culori and measured the color difference (CIEDE2000):

VisionDifference between red-600 and green-600
Typical74.8
Deuteranopia (no green cones)17.6
Protanopia (no red cones)41.5
Tritanopia (no blue cones)68.4

Under simulated deuteranopia the pair is four times closer together, close enough that an error and a success message can look alike. Pair every status color with an icon, a word ("Error", "Saved") or a pattern, and check the palette in the Color Blindness Simulator; our simulation guide explains the models.

Why the Minimums Are a Floor

Contrast changes how much a reader takes in per glance. In Legge and colleagues' reading experiments (Vision Research, 1997, retrieved through PubMed), the visual span, the number of letters recognized in one fixation, fell from about 10 characters for high-contrast text to fewer than 2 for low-contrast text, and reading slowed through longer fixations and extra eye movements; most low-vision readers showed the same pattern. Treat 4.5:1 as the minimum for body text and aim higher where people read for long stretches.

Turning the Palette Into Tokens

Name colors by role (--color-text, --color-text-muted, --color-danger) and document which text-on-background pairs are approved, with their measured ratios, so nobody pairs two tokens that were only ever tested against white. Give each role a light and a dark value from the start, and consider a higher-contrast set behind the prefers-contrast: more media query, which MDN's compatibility data lists in Chrome 96, Firefox 101 and Safari 14.1. The Accessible Palette Generator checks each color against light and dark backgrounds and shows ratios truncated to two decimals; the Dark Mode Generator shows a contrast table for both themes.

Frequently Asked Questions

How many colors do I need?+
As many roles as the interface has: usually text, muted text, borders, a primary action and status colors (danger, warning, success, info), each with a light and a dark value. Fewer colors means fewer pairs to test, which matters because every text color has to pass on every background it is used on.
Can I use my brand colors?+
Usually, with a darker or lighter step for text. If the brand color fails 4.5:1 against its background, keep it for large headings (3:1), borders and decorative fills, and add an adjusted shade for body text and buttons.
What about colorblind users?+
About 8% of men and 0.4% of women of European descent have red-green color deficiency (Birch, 2012). In our simulation, Tailwind red-600 and green-600 came four times closer under deuteranopia, so pair every status color with an icon, a word or a pattern instead of relying on hue.
How often should I re-test?+
Whenever a color token or a background changes, and before each release. A script that computes the ratio for every approved text-on-background pair can fail the build when one drops below its threshold.
Try it yourself

Build WCAG-compliant color palettes — free, no signup.

⚡ Open Accessible Palette Generator
DG
Derek Giordano
Written by the creator of Ultimate Design Tools. BA in Business Marketing.
⚡ Try the free Color Contrast Batch Checker →