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.
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 colors | Minimum (AA) | Success criterion |
|---|---|---|
| Body text and small labels | 4.5:1 against its background | 1.4.3 Contrast (Minimum) |
| Large text (24 px, or 18.66 px bold) | 3:1 | 1.4.3 |
| Text inside a button or badge | 4.5:1 against the button fill | 1.4.3 |
| Button outlines, input borders, focus rings, icons that carry meaning | 3:1 against what is next to them | 1.4.11 Non-text Contrast |
| Links told apart from body text by color alone | 3:1 between link and text color, plus an underline or other cue on hover and focus | 1.4.1 Use of Color (technique G183) |
| Enhanced level (AAA) | 7:1 for text, 4.5:1 for large text | 1.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:
| Hues | Text on white (4.5:1) from | Text on neutral-950 up to | UI parts on white (3:1) from |
|---|---|---|---|
| slate, gray, zinc, neutral, stone, mauve, mist, taupe | 500 | 400 | 500 |
| indigo | 500 | 400 | 400 |
| violet | 600 | 400 | 500 |
| red, blue, purple, fuchsia, pink, rose, olive | 600 | 500 | 500 |
| orange, amber, lime, green, emerald, teal, cyan, sky | 700 | 600 | 600 |
| yellow | 700 | 600 | 700 |
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):
| Vision | Difference between red-600 and green-600 |
|---|---|
| Typical | 74.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?
Can I use my brand colors?
What about colorblind users?
How often should I re-test?
Build WCAG-compliant color palettes — free, no signup.
⚡ Open Accessible Palette Generator- [1]W3C, Web Content Accessibility Guidelines (WCAG) 2.2: 1.4.1, 1.4.3, 1.4.6, 1.4.11 ↗
- [2]W3C, Technique G183: using a contrast ratio of 3:1 with surrounding text and providing additional visual cues on hover and focus for links ↗
- [3]Tailwind CSS 4.3.3, theme.css default color palette (source) ↗
- [4]Birch J (2012), Worldwide prevalence of red-green color deficiency, J Opt Soc Am A 29(3): 313-320 (via PubMed) ↗
- [5]Legge GE, Ahn SJ, Klitz TS, Luebker A (1997), Psychophysics of reading XVI: the visual span in normal and low vision, Vision Research 37(14): 1999-2010 (via PubMed) ↗
- [6]Machado GM, Oliveira MM, Fernandes LAF (2009), A Physiologically-based Model for Simulation of Color Vision Deficiency, IEEE TVCG 15(6) ↗
- [7]MDN browser-compat-data, prefers-contrast media feature, checked Oct 14, 2026 ↗
- [8]culori 4.0.2 (wcagContrast, toGamut, filterDeficiency*, differenceCiede2000) ↗
