Tailwind colors
One color in, a Tailwind scale out
Give it your brand color and get the eleven steps Tailwind expects, with your color on the scale exactly, the code for Tailwind 4 and 3, and the pairs that are safe for text.
Type a hex code or use the picker. The link in your address bar follows the color, so you can share the scale.
The number under each hex is the contrast of the best text in this scale on that step. Press a step to copy its hex.
Copy it into your project
Tailwind 4 reads colors from @theme in your CSS. Tailwind 3 reads them from the config file. Either way you get classes like bg-terracotta-600 and text-terracotta-50.
app.css
@import "tailwindcss";
@theme {
--color-terracotta-50: oklch(97.2% 0.014 39.4);
--color-terracotta-100: oklch(93.6% 0.033 38.6);
--color-terracotta-200: oklch(87.3% 0.069 36.2);
--color-terracotta-300: oklch(79.0% 0.123 35.7);
--color-terracotta-400: oklch(68.8% 0.133 35.8);
--color-terracotta-500: oklch(59.0% 0.136 35.5);
--color-terracotta-600: oklch(50.3% 0.132 35.7);
--color-terracotta-700: oklch(41.5% 0.126 35.6);
--color-terracotta-800: oklch(32.7% 0.114 35.2);
--color-terracotta-900: oklch(25.0% 0.090 33.7);
--color-terracotta-950: oklch(17.1% 0.064 32.6);
}As a theme
The scale on a real screen
A strip of swatches says little about how a scale works. Here it is as a card, a field and two buttons, light and dark, with the classes that draw each part.
On terracotta-50
Quarterly report
Revenue is up nine percent on last quarter. Most of the growth came from returning customers. Read the summary
- Button
- bg-terracotta-600 text-terracotta-50
- Soft button
- bg-terracotta-100 text-terracotta-800
- Text
- text-terracotta-950 / text-terracotta-800
- Border
- border-terracotta-200
On terracotta-950
Quarterly report
Revenue is up nine percent on last quarter. Most of the growth came from returning customers. Read the summary
- Button
- bg-terracotta-400 text-terracotta-950
- Soft button
- bg-terracotta-800 text-terracotta-100
- Text
- text-terracotta-50 / text-terracotta-200
- Border
- border-terracotta-800
Contrast
What reads on what
20 of the 55 pairs in this scale reach 4.5 to 1, the WCAG AA line for body text. Read across for a text step, down for a background step.
| text / bg | 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 50 | 1.1 | 1.3 | 1.8 | 2.7 | 4.0 | 5.8 | 8.4 | 11.9 | 15.1 | 17.7 | |
| 100 | 1.1 | 1.2 | 1.6 | 2.4 | 3.5 | 5.1 | 7.5 | 10.6 | 13.5 | 15.8 | |
| 200 | 1.3 | 1.2 | 1.3 | 1.9 | 2.9 | 4.2 | 6.1 | 8.6 | 10.9 | 12.8 | |
| 300 | 1.8 | 1.6 | 1.3 | 1.4 | 2.1 | 3.1 | 4.5 | 6.4 | 8.1 | 9.5 | |
| 400 | 2.7 | 2.4 | 1.9 | 1.4 | 1.4 | 2.1 | 3.1 | 4.3 | 5.5 | 6.5 | |
| 500 | 4.0 | 3.5 | 2.9 | 2.1 | 1.4 | 1.4 | 2.1 | 2.9 | 3.7 | 4.4 | |
| 600 | 5.8 | 5.1 | 4.2 | 3.1 | 2.1 | 1.4 | 1.4 | 2.0 | 2.6 | 3.0 | |
| 700 | 8.4 | 7.5 | 6.1 | 4.5 | 3.1 | 2.1 | 1.4 | 1.4 | 1.7 | 2.1 | |
| 800 | 11.9 | 10.6 | 8.6 | 6.4 | 4.3 | 2.9 | 2.0 | 1.4 | 1.2 | 1.4 | |
| 900 | 15.1 | 13.5 | 10.9 | 8.1 | 5.5 | 3.7 | 2.6 | 1.7 | 1.2 | 1.1 | |
| 950 | 17.7 | 15.8 | 12.8 | 9.5 | 6.5 | 4.4 | 3.0 | 2.1 | 1.4 | 1.1 |
Filled cells pass AA for body text (7.0 and up is AAA). Outlined cells at 3.0 or more pass for large text and for icons and borders only.
Nearest built-in color
The nearest color in Tailwind's palette is red-400 (#F87171). It is near, but visibly a different color.
See red-400 as a scaleterracotta (this scale)
red (Tailwind)
The dot marks your color on its scale and the nearest step in red.
Method
How this scale is made
Your color goes on the step whose lightness is nearest its own and is not changed. Many generators move the color to 500 and adjust it to fit, which is how a brand color ends up slightly off in production.
The other steps are spaced evenly in OKLCH lightness, a color space built to match how people see. Each step looks the same distance from the next, which a scale made by mixing with white and black does not manage.
The hue holds from 50 to 950. Color strength eases off toward both ends, where a screen cannot show strong color, so the pale steps stay clean and the dark steps do not go muddy.
Start from Tailwind
Tailwind's own colors, as scales
Each opens the 500 of that family, rebuilt as an even scale, so you can see how it differs from the one Tailwind ships.