Navigation

Tokens

Color palette

Every numbered palette step, fixed hue alias and other preset color token.

On this page

Classes

ClassDeclarations
bg-<name>background-color: var(--color-<name>);
fg-<name>color: var(--color-<name>);
b-<name>border-color: var(--color-<name>);
16 other color families
ClassDeclarations
bb-<name>border-bottom-color: var(--color-<name>);
bl-<name>border-left-color: var(--color-<name>);
br-<name>border-right-color: var(--color-<name>);
bt-<name>border-top-color: var(--color-<name>);
bx-<name>border-inline-color: var(--color-<name>);
by-<name>border-block-color: var(--color-<name>);
bxe-<name>border-inline-end-color: var(--color-<name>);
bxs-<name>border-inline-start-color: var(--color-<name>);
bye-<name>border-block-end-color: var(--color-<name>);
bys-<name>border-block-start-color: var(--color-<name>);
fill-<name>fill: var(--color-<name>);
caret-<name>caret-color: var(--color-<name>);
accent-<name>accent-color: var(--color-<name>);
stroke-<name>stroke: var(--color-<name>);
outline-<name>outline-color: var(--color-<name>);
text-fill-color-<name>-webkit-text-fill-color: var(--color-<name>);

A color class sets only the named property. For a visible border, combine a width such as b(1), a style such as b-solid and a color such as b-blue-60. Color roles use these same families and have their own value tables.

Values

Palette numbers are token keys, not opacity or lightness percentages. Higher numbered steps have lower OKLCH lightness. Each swatch copies its CSS value or variable reference; hue aliases below retain their authored token reference.

Palette

Choose a swatch to copy its original CSS color value.

Skip color swatches
stone
gray
zinc
neutral
slate
brown
orange
amber
yellow
lime
green
beryl
teal
cyan
sky
blue
indigo
violet
purple
fuchsia
pink
crimson
red
End of color palette

Hue aliases

ClassValue
bg-stonevar(--color-stone-30)
bg-grayvar(--color-gray-30)
bg-zincvar(--color-zinc-30)
bg-neutralvar(--color-neutral-30)
bg-slatevar(--color-slate-30)
bg-brownvar(--color-brown-40)
bg-orangevar(--color-orange-40)
bg-ambervar(--color-amber-40)
bg-yellowvar(--color-yellow-40)
bg-limevar(--color-lime-40)
bg-greenvar(--color-green-40)
bg-berylvar(--color-beryl-40)
bg-tealvar(--color-teal-40)
bg-cyanvar(--color-cyan-40)
bg-skyvar(--color-sky-60)
bg-bluevar(--color-blue-60)
bg-indigovar(--color-indigo-60)
bg-violetvar(--color-violet-60)
bg-purplevar(--color-purple-60)
bg-fuchsiavar(--color-fuchsia-60)
bg-pinkvar(--color-pink-60)
bg-crimsonvar(--color-crimson-60)
bg-redvar(--color-red-60)

Other colors

ClassValue
bg-whiteoklch(100% 0 none)
bg-blackoklch(0% 0 none)
bg-currentcurrentColor

Hue aliases select a fixed step

bg-blue reads --color-blue, whose preset value is var(--color-blue-60). bg-yellow instead reaches --color-yellow-40. The alias does not imply a common step number across hues.

Hue aliases do not share one step number

The preset blue alias references blue-60; yellow references yellow-40. The outlines mark those references, not a border added by either background class. Selected palette steps are shown.

Text description
  1. bg-blue reads --color-blue, which references --color-blue-60 in the preset. The blue strip marks step 60.
  2. bg-yellow reads --color-yellow, which references --color-yellow-40. The yellow strip marks step 40 in the same set of displayed steps.
  3. Both strips show actual palette colors at steps 10, 20, 40, 60, 80 and 90. Equal swatch widths are for comparison, not a scale of perceptual distance.
  4. The two alias chains remain the same in light and dark schemes. Redefining an alias or its referenced token can change its result.

Numbered steps and hue aliases do not switch with the color scheme. Adaptive text aliases such as fg-text-blue belong to Color roles. Redefining a token can change either behavior.

bg-current reads currentColor, so its result follows the element’s text color. There is no preset --color-transparent token. For transparency or another literal color, use a native declaration such as (background-color:transparent) or (background-color:#175fe9).

Usage

These status labels use explicit foreground and background steps. The words retain their meaning without color, and the selected colors stay fixed in both schemes.

Paid Pending Overdue Draft
<div>  <span class="… bg-green-5 fg-green-80">Paid</span>  <span class="… bg-amber-5 fg-amber-80">Pending</span>  <span class="… bg-red-5 fg-red-80">Overdue</span>  <span class="… bg-blue-5 fg-blue-70">Draft</span></div>
Generated CSS
@layer theme {  :root,  :host {    --color-amber-5: oklch(96.24% .0573 98.1);    --color-amber-80: oklch(53.09% .1677 39.7);    --color-green-5: oklch(94.95% .071 145.5);    --color-green-80: oklch(51.96% .1768 142.5);    --color-blue-5: oklch(93.53% .0305 231.3);    --color-blue-70: oklch(46.26% .3057 266.7);    --color-red-5: oklch(94.05% .0239 17);    --color-red-80: oklch(53.09% .2178 29.2)  }}@layer utilities {  .bg-amber-5 {    background-color: var(--color-amber-5)  }  .bg-blue-5 {    background-color: var(--color-blue-5)  }  .bg-green-5 {    background-color: var(--color-green-5)  }  .bg-red-5 {    background-color: var(--color-red-5)  }  .fg-amber-80 {    color: var(--color-amber-80)  }  .fg-blue-70 {    color: var(--color-blue-70)  }  .fg-green-80 {    color: var(--color-green-80)  }  .fg-red-80 {    color: var(--color-red-80)  }}

Customize

Register a color in @theme to make its key available to the color families. Here brand is available as bg-brand, fg-brand and b-brand, among others.

@theme {  --color-brand: oklch(56% .2 262);}
Generated CSS
@layer theme {  :root,  :host {    --color-brand: oklch(56% .2 262)  }}@layer utilities {  .bg-brand {    background-color: var(--color-brand)  }}