Theme generator
One brand colour in. An accessible React theme out.
Pick a colour and get a 12-step accent scale with a matching gray, for light and dark mode. Every text step is checked against WCAG AA. Try it on real Rad UI components, then copy the CSS variables or share the link.
Hex, like #5b4fe0. It becomes step 800.
The whole theme lives in the URL, so the link is the theme.
Live preview · dark
Acme workspace
Overview
Active projects
12
+3 this week
Open reviews
7
2 due today
Release health
98%
All checks green
Maya approved Billing settings
MergedJon commented on Onboarding flow
ReviewAna opened Dark mode polish
Draft
Scales and contrast
Twelve steps per scale, in Rad UI's token names. Text steps 950 and 1000 are checked against every background step they sit on. AA needs 4.5:1 for body text.
light
--rad-ui-color-accent-*
- 50#fbfbff
- 100#f5f6ff
- 200#edefff
- 300#e4e7ff
- 400#d9ddff
- 500#ccd1ff
- 600#bac0ff
- 700#9ca2ff
- 800#5b4fe0
- 900#5040d0
- 950#5450c2
- 1000#1f1b58
--rad-ui-color-gray-*
- 50#fcfdff
- 100#f8f9ff
- 200#f0f2fc
- 300#e9eaf5
- 400#e2e3ed
- 500#dadbe5
- 600#ccced8
- 700#b3b4be
- 800#8c8d96
- 900#7e7f89
- 950#61636b
- 1000#202128
| Sample | Text on | Ratio | AA |
|---|---|---|---|
| Aa | 950 / 50 | 6.16:1 | Pass |
| Aa | 950 / 100 | 5.91:1 | Pass |
| Aa | 950 / 200 | 5.57:1 | Pass |
| Aa | 1000 / 50 | 15.00:1 | AAA |
| Aa | 1000 / 100 | 14.39:1 | AAA |
| Aa | 1000 / 200 | 13.56:1 | AAA |
| Aa | 1000 / 300 | 12.67:1 | AAA |
| Aa | 1000 / 400 | 11.61:1 | AAA |
| Sample | Text on | Ratio | AA |
|---|---|---|---|
| Aa | 950 / 50 | 5.89:1 | Pass |
| Aa | 950 / 100 | 5.70:1 | Pass |
| Aa | 950 / 200 | 5.37:1 | Pass |
| Aa | 1000 / 50 | 15.76:1 | AAA |
| Aa | 1000 / 100 | 15.26:1 | AAA |
| Aa | 1000 / 200 | 14.36:1 | AAA |
| Aa | 1000 / 300 | 13.40:1 | AAA |
| Aa | 1000 / 400 | 12.56:1 | AAA |
Brand fill (800) on the page (50): 5.59:1. Switches, radios and progress bars clear the 3:1 non-text minimum. Button labels use 50 on 950, which always clears 4.5:1.
dark
--rad-ui-color-accent-*
- 50#0c0d1b
- 100#111223
- 200#1a1940
- 300#221e59
- 400#2a266d
- 500#34317f
- 600#444297
- 700#5a58c2
- 800#6156e8
- 900#6e67f9
- 950#b0b7ff
- 1000#e3e6ff
--rad-ui-color-gray-*
- 50#0f0f13
- 100#15151c
- 200#1d1d25
- 300#25262d
- 400#2d2e36
- 500#383941
- 600#494a52
- 700#61636b
- 800#787a83
- 900#878892
- 950#b5b7c0
- 1000#e9eaf5
| Sample | Text on | Ratio | AA |
|---|---|---|---|
| Aa | 950 / 50 | 10.16:1 | AAA |
| Aa | 950 / 100 | 9.75:1 | AAA |
| Aa | 950 / 200 | 8.80:1 | AAA |
| Aa | 1000 / 50 | 15.64:1 | AAA |
| Aa | 1000 / 100 | 15.01:1 | AAA |
| Aa | 1000 / 200 | 13.55:1 | AAA |
| Aa | 1000 / 300 | 12.18:1 | AAA |
| Aa | 1000 / 400 | 10.67:1 | AAA |
| Sample | Text on | Ratio | AA |
|---|---|---|---|
| Aa | 950 / 50 | 9.56:1 | AAA |
| Aa | 950 / 100 | 9.08:1 | AAA |
| Aa | 950 / 200 | 8.37:1 | AAA |
| Aa | 1000 / 50 | 15.99:1 | AAA |
| Aa | 1000 / 100 | 15.18:1 | AAA |
| Aa | 1000 / 200 | 13.99:1 | AAA |
| Aa | 1000 / 300 | 12.59:1 | AAA |
| Aa | 1000 / 400 | 11.28:1 | AAA |
Brand fill (800) on the page (50): 3.68:1. Switches, radios and progress bars clear the 3:1 non-text minimum. Button labels use 50 on 950, which always clears 4.5:1.
Export
Save the CSS as a file and load it after @radui/ui/themes/default.css. Your <Theme> keeps working as before, now in your colours.
/* Rad UI theme: brand #5b4fe0, brand-tinted gray, medium radius.
* Load after @radui/ui/themes/default.css. Overrides the gray and accent
* scales for every <Theme>, light and dark. Text steps 950 and 1000 meet
* WCAG AA (4.5:1) on steps 50-200 and 50-400. */
:root,
[data-rad-ui-theme] {
--rad-ui-color-gray-50: #fcfdff;
--rad-ui-color-gray-100: #f8f9ff;
--rad-ui-color-gray-200: #f0f2fc;
--rad-ui-color-gray-300: #e9eaf5;
--rad-ui-color-gray-400: #e2e3ed;
--rad-ui-color-gray-500: #dadbe5;
--rad-ui-color-gray-600: #ccced8;
--rad-ui-color-gray-700: #b3b4be;
--rad-ui-color-gray-800: #8c8d96;
--rad-ui-color-gray-900: #7e7f89;
--rad-ui-color-gray-950: #61636b;
--rad-ui-color-gray-1000: #202128;
--rad-ui-color-accent-50: #fbfbff;
--rad-ui-color-accent-100: #f5f6ff;
--rad-ui-color-accent-200: #edefff;
--rad-ui-color-accent-300: #e4e7ff;
--rad-ui-color-accent-400: #d9ddff;
--rad-ui-color-accent-500: #ccd1ff;
--rad-ui-color-accent-600: #bac0ff;
--rad-ui-color-accent-700: #9ca2ff;
--rad-ui-color-accent-800: #5b4fe0;
--rad-ui-color-accent-900: #5040d0;
--rad-ui-color-accent-950: #5450c2;
--rad-ui-color-accent-1000: #1f1b58;
--rad-ui-radius-sm: 0.375rem;
--rad-ui-radius-md: 0.5rem;
--rad-ui-radius-lg: 0.75rem;
--rad-ui-radius-xl: 1rem;
}
[data-rad-ui-theme="dark"] {
--rad-ui-color-gray-50: #0f0f13;
--rad-ui-color-gray-100: #15151c;
--rad-ui-color-gray-200: #1d1d25;
--rad-ui-color-gray-300: #25262d;
--rad-ui-color-gray-400: #2d2e36;
--rad-ui-color-gray-500: #383941;
--rad-ui-color-gray-600: #494a52;
--rad-ui-color-gray-700: #61636b;
--rad-ui-color-gray-800: #787a83;
--rad-ui-color-gray-900: #878892;
--rad-ui-color-gray-950: #b5b7c0;
--rad-ui-color-gray-1000: #e9eaf5;
--rad-ui-color-accent-50: #0c0d1b;
--rad-ui-color-accent-100: #111223;
--rad-ui-color-accent-200: #1a1940;
--rad-ui-color-accent-300: #221e59;
--rad-ui-color-accent-400: #2a266d;
--rad-ui-color-accent-500: #34317f;
--rad-ui-color-accent-600: #444297;
--rad-ui-color-accent-700: #5a58c2;
--rad-ui-color-accent-800: #6156e8;
--rad-ui-color-accent-900: #6e67f9;
--rad-ui-color-accent-950: #b0b7ff;
--rad-ui-color-accent-1000: #e3e6ff;
}
How it works
New to the token names? Read the design token contract or browse the built-in colour families.
- How is the palette built?
- The brand colour is converted to OKLCH. Each of the 12 steps gets a target lightness for light and dark mode and a share of the brand’s chroma, so tints stay calm and the solid steps stay vivid. Step 800 is your brand exactly. Colours outside sRGB lose chroma, not lightness or hue, until they fit.
- What does “accessible” mean here?
- Text steps 950 and 1000 are pushed darker (light mode) or lighter (dark mode) until they reach at least 4.5:1, the WCAG AA minimum for body text, against every background step they are used on: 50 to 200 for secondary text and 50 to 400 for primary text and button labels. Contrast is measured on the final hex values, the same ones you copy.
- Is it like Radix Colors?
- The idea is the same: 12 steps with a job each, from app background to high-contrast text. Radix Colors ships a fixed set of hand-tuned scales. This generator makes a scale from any brand colour and checks its contrast as it goes, in Rad UI’s token names (--rad-ui-color-accent-50 to -1000).
- Do I need Tailwind?
- No. The export is plain CSS custom properties. If you use Tailwind v4, the second tab adds accent-* utilities next to the gray-* ones the Rad UI preset already provides.
- Does it change behaviour or accessibility of components?
- No. Rad UI components keep their roles, keyboard support and focus handling; the theme only swaps colour and radius tokens.