Color palettes
Four ready-made palettes and a one-class way to make your own. Radix scales for interface states, React Aria-style scales computed from one color, an Untitled UI-style palette, and UseColorScale for brand colors.
Every color property takes any CSS color (c-red, bgc-6366f1, c-oklch(0.6_0.2_280), bgc-6366f1/0.15). For a whole interface you want scales instead: a set of steps from light to dark, designed to work together. AliasCSS ships four.
| Palette | Write | Steps | Light and dark | Use it for |
|---|---|---|---|---|
| Radix | bgc-redTheme3 |
1–12 | Yes, with Theme |
Interface states: fills, borders, text |
| React Aria-style | bgc-accentRATheme900 |
100–1600 | Yes, with Theme |
A brand or accent color from one seed |
| Untitled UI-style | bgc-gray-500 |
25–950 | Through variables | Design files that use this palette |
| Your own | UseColorScale(e11d48,danger) |
100–1600 | Follows the OS setting | Any extra brand color |
Theme tokens need x-theme on <html>, which sets color-scheme (see Colors and themes).
Radix scales
The Radix Colors scales, 31 of them, each with 12 steps. Every step has a job, so picking a color is picking a step:
| Steps | Job | Example |
|---|---|---|
| 1–2 | App and subtle backgrounds | bgc-slateTheme1, bgc-blueTheme2 |
| 3–5 | Component fills: normal, hover, pressed | bgc-blueTheme3 --hover-bgc-blueTheme4 |
| 6–8 | Borders and separators, then focus rings | b-1px-solid-slateTheme6 |
| 9–10 | Solid fills: buttons, badges, dots | bgc-blueTheme9 --hover-bgc-blueTheme10 |
| 11–12 | Text: secondary and primary | c-slateTheme11, c-slateTheme12 |
<div class="d-flex flex-wrap-wrap g-8px">
<span class="p-6px-12px br-999px bgc-greenTheme3 c-greenTheme11 fs-13px">Paid</span>
<span class="p-6px-12px br-999px bgc-amberTheme3 c-amberTheme11 fs-13px">Pending</span>
<span class="p-6px-12px br-999px bgc-redTheme3 c-redTheme11 fs-13px">Failed</span>
<button class="p-8px-14px br-8px b-0 bgc-blueTheme9 c-white fs-13px cursor-pointer --hover-bgc-blueTheme10">Solid</button>
<button class="p-8px-14px br-8px b-1px-solid-slateTheme7 bgc-slateTheme1 c-slateTheme12 fs-13px cursor-pointer --hover-bgc-slateTheme3">Outline</button>
</div>Generated CSS
.d-flex {
display: flex;
}
.flex-wrap-wrap {
flex-wrap: wrap;
}
.g-8px {
gap: 8px;
}
.p-6px-12px {
padding: 6px 12px;
}
.br-999px {
border-radius: 999px;
}
.bgc-greenTheme3 {
background-color: light-dark(#e6f6eb,#132d21);
}
.c-greenTheme11 {
color: light-dark(#218358,#3dd68c);
}
.fs-13px {
font-size: 13px;
}
.bgc-amberTheme3 {
background-color: light-dark(#fff7c2,#302008);
}
.c-amberTheme11 {
color: light-dark(#ab6400,#ffca16);
}
.bgc-redTheme3 {
background-color: light-dark(#feebec,#3b1219);
}
.c-redTheme11 {
color: light-dark(#ce2c31,#ff9592);
}
.p-8px-14px {
padding: 8px 14px;
}
.br-8px {
border-radius: 8px;
}
.b-0 {
border: 0;
}
.bgc-blueTheme9 {
background-color: light-dark(#0090ff,#0090ff);
}
.c-white {
color: white;
}
.cursor-pointer {
cursor: pointer;
}
.--hover-bgc-blueTheme10:hover {
background-color: light-dark(#0588f0,#3b9eff);
}
.b-1px-solid-slateTheme7 {
border: 1px solid light-dark(#cdced6,#43484e);
}
.bgc-slateTheme1 {
background-color: light-dark(#fcfcfd,#111113);
}
.c-slateTheme12 {
color: light-dark(#1c2024,#edeef0);
}
.--hover-bgc-slateTheme3:hover {
background-color: light-dark(#f0f0f3,#212225);
}Each scale comes in several forms:
| Form | Example | What it is |
|---|---|---|
nameTheme |
redTheme9 |
Light and dark in one token, with light-dark(). Use this one. |
name / nameDark |
red9, redDark9 |
Only the light or only the dark value |
nameThemeA |
redThemeA5 |
Transparent version, for overlays on any background |
nameA / nameDarkA |
redA5, redDarkA5 |
Transparent, light or dark only |
…P3 |
redThemeP39 |
Display P3 versions, more vivid on wide-gamut screens |
blackA, whiteA |
blackA8, whiteA4 |
Black and white with alpha, steps 1–12 |
The grays (gray, mauve, slate, sage, olive, sand) each lean toward a hue. Pair a gray with an accent of the same temperature: slate with blue or indigo, sage with green or teal, sand with amber or orange.
Switch the site theme with the button in the header and the swatches follow:
slategraymauvesageolivesandtomatoredrubycrimsonpinkplumpurplevioletirisindigobluecyantealjadegreengrassbrownbronzegoldskymintlimeyellowamberorangeSteps 9 and 10 of sky, mint, lime, yellow and amber are light colors: put dark text on them (c-slateTheme12 or c-black), not white.
React Aria-style scales
Sixteen steps, 100 to 1600, like the scales of Adobe’s React Spectrum and React Aria. They aren’t a fixed list of hex values: each scale is computed in OKLCH from one seed color, so a scale follows whatever color you give it. Step 100 is the lightest in light mode and 1600 the darkest; in dark mode the order flips, so bgc-accentRATheme100 is always a quiet background and c-accentRATheme1100 is always readable text.
| Scale | Seed variable | Default |
|---|---|---|
accentRA… |
--accentColor |
Indigo |
brandRA… |
--brandColor |
Indigo |
tintRA… |
--tintColor |
Indigo |
grayRA… |
--grayColor |
Neutral gray |
redRA…, orangeRA…, yellowRA…, turquoiseRA…, cyanRA…, greenRA…, blueRA…, indigoRA…, purpleRA…, pinkRA… |
--redColor, --orangeColor, … |
The named hue |
Each comes as accentRA900 (light value), accentRADark900 (dark value) and accentRATheme900 (both, with light-dark()).
accentgrayredorangeyellowturquoisegreenbluepurplepinkRebrand with one variable
Set the seed once and every step of that scale changes. Put it on <html> for the whole site, or on any element for one part of the page:
<html class="x-theme --accentColor:0d9488">
<div class="d-flex flex-wrap-wrap g-8px --accentColor:e11d48">
<span class="p-8px-12px br-8px bgc-accentRATheme100 c-accentRATheme1100 fs-13px">Soft</span>
<span class="p-8px-12px br-8px bgc-accentRA1000 c-white fs-13px">Solid</span>
<span class="p-8px-12px br-8px b-1px-solid-accentRATheme700 c-accentRATheme1100 fs-13px">Outline</span>
</div>Generated CSS
.d-flex {
display: flex;
}
.flex-wrap-wrap {
flex-wrap: wrap;
}
.g-8px {
gap: 8px;
}
.--accentColor\:e11d48 {
--accentColor: #e11d48;
}
.p-8px-12px {
padding: 8px 12px;
}
.br-8px {
border-radius: 8px;
}
.bgc-accentRATheme100 {
background-color: light-dark(oklch(from var(--accentColor,oklch(1 .25049 284.23)) 98.1187% calc(l * c * 0.5) h),oklch(from var(--accentColor,oklch(1 .25049 284.23)) 29.6725% calc(l * c * 0.5) h));
}
.c-accentRATheme1100 {
color: light-dark(oklch(from var(--accentColor,oklch(1 .25049 284.23)) 46.9058% c h),oklch(from var(--accentColor,oklch(1 .25049 284.23)) 72.3297% c h));
}
.fs-13px {
font-size: 13px;
}
.bgc-accentRA1000 {
background-color: oklch(from var(--accentColor,oklch(1 .25049 284.23)) 51.9076% c h);
}
.c-white {
color: white;
}
.b-1px-solid-accentRATheme700 {
border: 1px solid light-dark(oklch(from var(--accentColor,oklch(1 .25049 284.23)) 67.0121% c h),oklch(from var(--accentColor,oklch(1 .25049 284.23)) 56.1347% c h));
}For white text on a solid fill, use the fixed accentRA1000: it stays dark enough in both modes. accentRATheme1000 gets lighter in dark mode, which suits a fill under dark text.
Untitled UI-style palette
A 12-step palette (25, 50, 100 … 900, 950) in the style of Untitled UI. Each token is a CSS variable with the color as its fallback, so you can retune any step without touching the classes:
bgc-gray-500 → background-color: var(--gray500, #667085)
graybranderrorwarningsuccessThe full list: gray, grayDark, brand, primary, error, warning, success, the gray tints grayBlue, grayCool, grayModern, grayNeutral, grayIron, grayTrue, grayWarm, and moss, greenLight, green, teal, cyan, blueLight, blue, blueDark, indigo, violet, purple, fuchsia, pink, rose, orangeDark, orange, yellow. The dash is optional: gray-500 and gray500 are the same.
These are single values, not light/dark pairs. For dark mode, grayDark-* holds the dark grays, and the built-in semantic classes switch between the two for you: x-import-utils-classes defines text-primary, bg-secondary, border-primary, fg-brand-primary and the rest, each with an @dark value.
The Radix gray gray9 and this palette’s gray-500 are different colors. Steps 1–12 are always Radix; 25–950 are always this palette.
Your own scale: UseColorScale
UseColorScale(color,name) turns one color into a 16-step scale, stored as CSS variables on the element: --name holds the color and --name-100 … --name-1600 the steps. Children use the steps like any variable, with --:
<div class="UseColorScale(e11d48,danger)">
<p class="bgc--danger-100 c--danger-1100 b-1px-solid--danger-600">…</p>
</div>
<div class="UseColorScale(e11d48,danger) d-flex flex-wrap-wrap aic g-8px">
<span class="p-8px-12px br-8px bgc--danger-100 c--danger-1100 fs-13px">Soft</span>
<span class="p-8px-12px br-8px bgc--danger-1000 c-white fs-13px">Solid</span>
<span class="p-8px-12px br-8px b-1px-solid--danger-600 c--danger-1100 fs-13px">Outline</span>
</div>Generated CSS
.UseColorScale\(e11d48\,danger\) {
--danger: #e11d48;
--lightness-100: 98.1187%;
--lightness-200: 95.2045%;
--lightness-300: 91.1434%;
--lightness-400: 85.1751%;
--lightness-500: 79.1773%;
--lightness-600: 72.3297%;
--lightness-700: 67.0121%;
--lightness-800: 62.3039%;
--lightness-900: 57.9699%;
--lightness-1000: 51.9076%;
--lightness-1100: 46.9058%;
--lightness-1200: 41.0821%;
--lightness-1300: 35.3616%;
--lightness-1400: 29.6725%;
--lightness-1500: 24.5366%;
--lightness-1600: 16.6959%;
--chroma-100: calc(l * c * 0.5);
--chroma-200: calc(l * c * 0.6);
--chroma-300: calc(l * c * 0.7);
--chroma-400: calc(l * c * 0.8);
--chroma-500: calc(l * c * 0.9);
--chroma-600: c;
--chroma-700: c;
--chroma-800: c;
--chroma-900: c;
--chroma-1000: c;
--chroma-1100: c;
--chroma-1200: c;
--chroma-1300: c;
--chroma-1400: c;
--chroma-1500: c;
--chroma-1600: c;
@media (prefers-color-scheme: dark) {
--lightness-100: 29.6725%;
--lightness-200: 35.3616%;
--lightness-300: 41.0821%;
--lightness-400: 46.9058%;
--lightness-500: 51.9076%;
--lightness-600: 57.9699%;
--lightness-700: 56.1347%;
--lightness-800: 59.2866%;
--lightness-900: 62.3039%;
--lightness-1000: 67.0121%;
--lightness-1100: 72.3297%;
--lightness-1200: 79.1773%;
--lightness-1300: 85.1751%;
--lightness-1400: 91.1434%;
--lightness-1500: 95.2045%;
--lightness-1600: 100%;
}
--danger-100: oklch(from var(--danger) var(--lightness-100) var(--chroma-100) h);
--danger-200: oklch(from var(--danger) var(--lightness-200) var(--chroma-200) h);
--danger-300: oklch(from var(--danger) var(--lightness-300) var(--chroma-300) h);
--danger-400: oklch(from var(--danger) var(--lightness-400) var(--chroma-400) h);
--danger-500: oklch(from var(--danger) var(--lightness-500) var(--chroma-500) h);
--danger-600: oklch(from var(--danger) var(--lightness-600) var(--chroma-600) h);
--danger-700: oklch(from var(--danger) var(--lightness-700) var(--chroma-700) h);
--danger-800: oklch(from var(--danger) var(--lightness-800) var(--chroma-800) h);
--danger-900: oklch(from var(--danger) var(--lightness-900) var(--chroma-900) h);
--danger-1000: oklch(from var(--danger) var(--lightness-1000) var(--chroma-1000) h);
--danger-1100: oklch(from var(--danger) var(--lightness-1100) var(--chroma-1100) h);
--danger-1200: oklch(from var(--danger) var(--lightness-1200) var(--chroma-1200) h);
--danger-1300: oklch(from var(--danger) var(--lightness-1300) var(--chroma-1300) h);
--danger-1400: oklch(from var(--danger) var(--lightness-1400) var(--chroma-1400) h);
--danger-1500: oklch(from var(--danger) var(--lightness-1500) var(--chroma-1500) h);
--danger-1600: oklch(from var(--danger) var(--lightness-1600) var(--chroma-1600) h);
}
.d-flex {
display: flex;
}
.flex-wrap-wrap {
flex-wrap: wrap;
}
.aic {
align-items: center;
}
.g-8px {
gap: 8px;
}
.p-8px-12px {
padding: 8px 12px;
}
.br-8px {
border-radius: 8px;
}
.bgc--danger-100 {
background-color: var(--danger-100);
}
.c--danger-1100 {
color: var(--danger-1100);
}
.fs-13px {
font-size: 13px;
}
.bgc--danger-1000 {
background-color: var(--danger-1000);
}
.c-white {
color: white;
}
.b-1px-solid--danger-600 {
border: 1px solid var(--danger-600);
}dangerbrandwarn- The color can be anything the color compiler reads: hex without
#(e11d48), a name (teal), a function (oklch(0.6_0.2_25)), a variable (--brand) or a token (redTheme9). - The name is optional.
UseColorScale(e11d48)makes--tintand--tint-100…--tint-1600. - Put it high up, on
<html>or a layout wrapper, so every element below can use the steps. Several scales can live on the same element. - The light steps are softer. Steps 100–500 lower the color’s chroma, so pale backgrounds don’t glow. It uses the same lightness steps as the RA scales, so a custom scale sits next to
accentRA…without clashing. - Dark mode follows the operating system (
prefers-color-scheme), not thex-theme-darkandx-theme-lightclasses. That’s why the swatches above don’t change with this site’s theme button.
Alpha
Add / and a decimal from 0 to 1 to any color, token or variable: bgc-accentRA1000/0.12, c-slateTheme12/0.6, bgc--danger-900/0.2. It compiles to a relative color (oklch(from … l c h / 0.12)). The Radix A scales (slateThemeA3) are the other way to get transparency, with values tuned for each step.