Tailwind CSS colors

The full default palette of Tailwind CSS v4 (26 colors) and v3 (22 colors), each with 11 shades from 50 to 950. Click a swatch to copy it as HEX, OKLCH, RGB, a class name or a CSS variable.

Tailwind version
Copy as

Click any swatch to copy it.

red

orange

amber

yellow

lime

green

emerald

teal

cyan

sky

blue

indigo

violet

purple

fuchsia

pink

rose

slate

gray

zinc

neutral

stone

mauve

olive

mist

taupe

Outside the sRGB gamut: the HEX shown is the nearest sRGB color. Wide-gamut (Display P3) screens can show the OKLCH value more vividly.

Find the nearest Tailwind color

How to use the Tailwind CSS colors reference

  1. Pick v4 or v3 to match the Tailwind CSS version your project uses.
  2. Choose how a click should copy: HEX, OKLCH, RGB, a class name such as bg-sky-500 (pick the bg-, text- or border- prefix), or a CSS variable such as var(--color-sky-500).
  3. Type part of a name into Filter by color name to show only matching families, for example gr for green and gray.
  4. Click a swatch. The value is copied to your clipboard and the line above the grid says what was copied.
  5. To match an existing color, type it into Find the nearest Tailwind color or use the picker, and compare it side by side with the closest v4 and v3 colors.

How the palette is named

Each color family has a name, such as sky or slate, and 11 shades numbered 50, 100, 200 and so on up to 900, then 950. Low numbers are light and high numbers are dark; 500 sits in the middle. A class name joins a utility, the family and the shade: bg-sky-500 sets a background, text-sky-500 a text color and border-sky-500 a border color. The 950 shade was added in Tailwind CSS v3.3 (March 2023).

The families run around the color wheel from red, orange, amber and yellow through lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia and pink to rose, followed by the grays: slate, gray, zinc, neutral and stone. Tailwind CSS v4.2 (February 2026) added four more grays with a slight tint: mauve, olive, mist and taupe. That makes 26 families in v4 and 22 in v3. Black and white are also built in as black and white, without shades.

Tailwind CSS v4 and v3 colors compared

v4v3
Families26 (v4.2 and later)22
Defined inOKLCH, e.g. oklch(63.7% 0.237 25.331)HEX, e.g. #ef4444
Configured inCSS, with @themetailwind.config.js
CSS variablesEach color you use, e.g. --color-red-500 (@theme static outputs all of them)None by default

Version 4.0 (January 2025) moved the whole palette from RGB to OKLCH so that colors can use more than the sRGB range where screens allow it. Comparing the two palettes in this tool, every v4 shade keeps its v3 lightness to within 0.9 percentage points, every shade keeps its v3 hue, and 214 of the 242 shared shades have more chroma (28 have slightly less), so v4 looks more saturated. For example, red-500 is #ef4444 in v3, which is oklch(63.68% 0.2078 25.33), and oklch(63.7% 0.237 25.331) in v4: same lightness and hue, more chroma.

Why v4 HEX values are approximate

OKLCH can describe colors that ordinary sRGB screens cannot show. Of the 286 v4 colors, 95 fall outside the sRGB gamut; they are marked with an asterisk in the grid. On a wide-gamut screen, such as a Display P3 laptop or phone, browsers can show those colors more vividly than any HEX value can. The HEX here is the nearest sRGB color, found with the gamut mapping method in CSS Color Module Level 4: keep the lightness and hue, and lower the chroma until clipping to sRGB changes the color by less than a just-noticeable amount (a deltaE OK of 0.02).

Red-500, oklch(63.7% 0.237 25.331), is inside sRGB and converts to #fb2c36. Red-600, oklch(57.7% 0.245 27.325), is outside it and maps to #e7000b. Converters that simply clip each channel to 0–255 can give different HEX values for out-of-gamut colors. If you need the exact v4 color, copy the OKLCH value, which every current major browser supports.

Using colors in Tailwind CSS v4

In v4 the theme lives in your CSS. Every color is a theme variable in the --color-* namespace, which creates the utilities and is output as a normal CSS variable when you use it:

@import "tailwindcss";

@theme {
  --color-brand-500: oklch(62% 0.19 255);
  --color-gray-50: oklch(98.5% 0.002 247); /* replaces a default */
}

.note { border-color: var(--color-sky-500); }

Defining --color-brand-500 gives you bg-brand-500, text-brand-500 and the rest. Reusing a default name such as --color-gray-50 replaces that shade. To remove a family, set --color-lime-*: initial in @theme. To drop the whole default palette and use only your own colors, start the block with --color-*: initial; this also removes black and white, so add them back if you need them.

Using colors in Tailwind CSS v3

In v3 the palette is a JavaScript object. Add colors under theme.extend.colors in tailwind.config.js to keep the defaults, or under theme.colors to replace them. To use only some defaults, import them with require('tailwindcss/colors') and list the ones you want, for example sky: colors.sky. In plain CSS, v3 reads a color with the theme() function, as in theme('colors.sky.500'); that is what the CSS variable option copies in v3 mode.

Opacity modifiers

Add a slash and a percentage to any color utility to make it see-through: bg-sky-500/50 is sky-500 at 50% opacity, and bg-black/75 is 75%. Both versions support this, and both accept arbitrary values, such as bg-sky-500/[.06] in v3 or bg-pink-500/[71.37%] in v4. In v4 the transparent color is built with the CSS color-mix() function, and in your own CSS you can write --alpha(var(--color-gray-950) / 10%).

Finding the nearest color

The finder converts your color to OKLab and measures its distance to all 11 shades of every family with deltaE OK, the straight-line distance in OKLab. For v4 it measures against the OKLCH values themselves, not their HEX approximations. A distance under 0.02 is below the just-noticeable difference that CSS Color 4 uses. For example, #1da1f2 is closest to sky-500 in both versions: #00a6f4 in v4 at a distance of 0.0205, and #0ea5e9 in v3 at 0.0195.

License

Tailwind CSS is open source under the MIT License, made by Tailwind Labs. The color values here are taken from the published packages (tailwindcss 4.3.5 and 3.4.19). Dev Kit Bag is not affiliated with or endorsed by Tailwind Labs.

Key terms

OKLCH
A CSS color format of lightness, chroma and hue, built on the OKLab color space published by Björn Ottosson in 2020. Equal steps in its lightness look roughly equal to the eye, which plain HSL does not manage. Tailwind CSS v4 defines its default palette in OKLCH.
Chroma
How colorful a color is compared with a gray of the same lightness. In OKLCH, 0 is a neutral gray and higher numbers are more saturated. The highest chroma a screen can show depends on the hue, the lightness and the gamut of the display.
Color gamut
The range of colors a color space or display can reproduce. sRGB is the standard gamut of the web and of most HEX and rgb() values; Display P3 is a wider gamut found on many recent laptops, phones and monitors.
Gamut mapping
Turning a color that is outside a gamut into the closest color inside it. CSS Color 4's gamut mapping algorithm keeps lightness and hue and lowering chroma until the result is within a just-noticeable difference of a color the screen can show; the final clip can shift the hue slightly.
Display P3
A wide color gamut, based on the DCI-P3 cinema standard with the sRGB white point and tone curve, used by many recent Apple devices and other screens. It includes more saturated reds, greens and oranges than sRGB can show.
deltaE OK
The straight-line distance between two colors in OKLab. A value of 0 means identical. CSS Color 4 uses it for gamut mapping and treats 0.02 as a just-noticeable difference.
Opacity modifier
Tailwind CSS syntax that adds transparency to a color utility with a slash and a number, such as bg-sky-500/50 for 50% opacity. It works with any color utility, including text, border and ring colors.
Theme variable
In Tailwind CSS v4, a CSS custom property defined inside @theme, such as --color-sky-500. Theme variables create the matching utility classes and are output as CSS variables you can read with var() when they are used.

Frequently asked questions

What is the HEX code for Tailwind red-500?
In v4 it is #fb2c36, the sRGB equivalent of oklch(63.7% 0.237 25.331). In v3, red-500 is #ef4444.
Why do v4 colors look different from v3?
v4 keeps the v3 hue and lightness of each shade but raises the chroma of most of them, so they look more saturated, especially on wide-gamut screens.
When were mauve, olive, mist and taupe added?
They arrived in Tailwind CSS v4.2.0, released in February 2026. They are not in v3 or in earlier v4 releases.
Should I use the HEX or the OKLCH value?
In a v4 project, use the OKLCH value or the CSS variable so you get the color exactly as Tailwind defines it. Use HEX for tools that do not accept OKLCH, such as some design apps or email templates, knowing it is the nearest sRGB color.
How do I use a Tailwind color in plain CSS?
In v4, use var(--color-sky-500) anywhere in your CSS. In v3, use theme('colors.sky.500') in a file processed by Tailwind, or paste the HEX value.
How do I add my own color to Tailwind?
In v4, define --color-yourname-500 and the other shades inside @theme. In v3, add a colors object under theme.extend.colors in tailwind.config.js. The Tailwind color generator on this site can make all 11 shades from one color.
Does clicking a swatch work without a mouse?
Each swatch is a button, so you can Tab to it and press Enter or Space to copy. The copied value is announced to screen readers.

Sources: Tailwind CSS colors, Tailwind CSS v3 customizing colors, Tailwind CSS changelog, Tailwind CSS v4.0 announcement, CSS Color 4 gamut mapping. Last checked 2026-11-17.