TExcelTAD
Home › Tailwind CSS › Tailwind Colors

Tailwind Colors

Tailwind ships with a carefully tuned colour palette. Every colour comes in 11 shades, from a very light 50 to a very dark 950, so you can build backgrounds, borders and text that always match.

The palette

Group Colours
Neutrals slate, gray, zinc, neutral, stone
Warm red, orange, amber, yellow
Green lime, green, emerald, teal
Blue cyan, sky, blue, indigo
Purple / pink violet, purple, fuchsia, pink, rose
Special black, white, transparent, current, inherit

Shades are 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. A colour class is written utility-color-shade, for example bg-emerald-200 or text-rose-700.

html · try it yourself
<!DOCTYPE html>
<html>
<head>
  <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4.1.11"></script>
</head>
<body class="p-4 font-mono text-[10px]">
  <div class="grid grid-cols-11 gap-1">
    <div class="h-10 rounded bg-sky-50"></div><div class="h-10 rounded bg-sky-100"></div>
    <div class="h-10 rounded bg-sky-200"></div><div class="h-10 rounded bg-sky-300"></div>
    <div class="h-10 rounded bg-sky-400"></div><div class="h-10 rounded bg-sky-500"></div>
    <div class="h-10 rounded bg-sky-600"></div><div class="h-10 rounded bg-sky-700"></div>
    <div class="h-10 rounded bg-sky-800"></div><div class="h-10 rounded bg-sky-900"></div>
    <div class="h-10 rounded bg-sky-950"></div>
    <div class="h-10 rounded bg-rose-50"></div><div class="h-10 rounded bg-rose-100"></div>
    <div class="h-10 rounded bg-rose-200"></div><div class="h-10 rounded bg-rose-300"></div>
    <div class="h-10 rounded bg-rose-400"></div><div class="h-10 rounded bg-rose-500"></div>
    <div class="h-10 rounded bg-rose-600"></div><div class="h-10 rounded bg-rose-700"></div>
    <div class="h-10 rounded bg-rose-800"></div><div class="h-10 rounded bg-rose-900"></div>
    <div class="h-10 rounded bg-rose-950"></div>
  </div>
  <p class="mt-2 text-gray-500">50 → 950. Change "sky" or "rose" to any other palette name.</p>
</body>
</html>

Note: In v4 the default palette is defined with oklch() colours, which look more vivid on modern wide-gamut screens. Each colour is also exposed as a CSS variable such as var(--color-sky-500).

Utilities that take a colour

The same colour names work with many utilities:

Utility Colours what Example
bg-* background bg-amber-100
text-* text text-amber-900
border-* borders border-amber-300
ring-* / outline-* focus rings and outlines ring-amber-500
decoration-* underline colour decoration-amber-500
shadow-* shadow colour shadow-amber-500/50
fill-* / stroke-* SVG shapes fill-amber-400
accent-* checkboxes, radios, range sliders accent-amber-600
caret-* the text cursor in inputs caret-amber-600
placeholder:text-* placeholder text placeholder:text-amber-400
html · try it yourself
<!DOCTYPE html>
<html>
<head>
  <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4.1.11"></script>
</head>
<body class="space-y-3 p-6">
  <div class="rounded-lg border-2 border-amber-300 bg-amber-50 p-3 text-amber-900">
    ⚠️ A warning box: light background, mid border, dark text.
  </div>
  <p class="underline decoration-pink-500 decoration-4 underline-offset-4">Coloured underline</p>
  <label class="flex items-center gap-2"><input type="checkbox" checked class="size-5 accent-emerald-600"> Accent-coloured checkbox</label>
  <svg viewBox="0 0 24 24" class="size-10 fill-yellow-400 stroke-orange-600 stroke-1"><path d="M12 2l3 7h7l-5.5 4.5L18 21l-6-4-6 4 1.5-7.5L2 9h7z"/></svg>
</body>
</html>

Opacity with the slash modifier

Add /<percent> to any colour utility to make it semi-transparent. This replaces v3's separate bg-opacity-* and text-opacity-* classes, which were removed in v4.

html · try it yourself
<!DOCTYPE html>
<html>
<head>
  <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4.1.11"></script>
</head>
<body class="bg-linear-to-r from-indigo-500 to-pink-500 p-6">
  <div class="space-y-2 text-white">
    <div class="rounded bg-black/10 p-2">bg-black/10</div>
    <div class="rounded bg-black/30 p-2">bg-black/30</div>
    <div class="rounded bg-black/60 p-2">bg-black/60</div>
    <div class="rounded bg-white/20 p-2 text-white/70">bg-white/20 with text-white/70</div>
  </div>
</body>
</html>

Choosing shades that work together

A reliable recipe for readable components:

Role Light UI Dark UI
Page background 50 – 100 900 – 950
Borders / dividers 200 – 300 700 – 800
Main buttons 500 – 600 400 – 500
Body text 700 – 900 (neutral) 100 – 300 (neutral)

current is handy for icons: fill-current makes an SVG use whatever text colour its parent has.

Tip: Need a colour that's not in the palette? You can use an arbitrary value like bg-[#1da1f2] (covered later) or, better, add a named colour with @theme { --color-brand: … } so it works with every colour utility.

Test yourself

Which class gives a dark red text colour?

  1. text-red-100
  2. text-red-800
  3. bg-red-800
  4. red-text-800

How do you make a black background 40% opaque in Tailwind v4?

  1. bg-black bg-opacity-40
  2. bg-black/40
  3. bg-black-40
  4. opacity-40-bg-black

Which utility colours a native checkbox?

  1. fill-*
  2. caret-*
  3. accent-*
  4. ring-*