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.

Gray
Radius
Preview

The whole theme lives in the URL, so the link is the theme.

Live preview · dark

Acme workspace

Overview

Pro plan

Active projects

12

+3 this week

Open reviews

7

2 due today

Release health

98%

All checks green

  • Maya approved Billing settings

    Merged
  • Jon commented on Onboarding flow

    Review
  • Ana opened Dark mode polish

    Draft
Visibility
Get the CSS

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-*

  1. 50#fbfbff
  2. 100#f5f6ff
  3. 200#edefff
  4. 300#e4e7ff
  5. 400#d9ddff
  6. 500#ccd1ff
  7. 600#bac0ff
  8. 700#9ca2ff
  9. 800#5b4fe0
  10. 900#5040d0
  11. 950#5450c2
  12. 1000#1f1b58

--rad-ui-color-gray-*

  1. 50#fcfdff
  2. 100#f8f9ff
  3. 200#f0f2fc
  4. 300#e9eaf5
  5. 400#e2e3ed
  6. 500#dadbe5
  7. 600#ccced8
  8. 700#b3b4be
  9. 800#8c8d96
  10. 900#7e7f89
  11. 950#61636b
  12. 1000#202128
Accent text
SampleText onRatioAA
Aa950 / 506.16:1Pass
Aa950 / 1005.91:1Pass
Aa950 / 2005.57:1Pass
Aa1000 / 5015.00:1AAA
Aa1000 / 10014.39:1AAA
Aa1000 / 20013.56:1AAA
Aa1000 / 30012.67:1AAA
Aa1000 / 40011.61:1AAA
Gray text
SampleText onRatioAA
Aa950 / 505.89:1Pass
Aa950 / 1005.70:1Pass
Aa950 / 2005.37:1Pass
Aa1000 / 5015.76:1AAA
Aa1000 / 10015.26:1AAA
Aa1000 / 20014.36:1AAA
Aa1000 / 30013.40:1AAA
Aa1000 / 40012.56:1AAA

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-*

  1. 50#0c0d1b
  2. 100#111223
  3. 200#1a1940
  4. 300#221e59
  5. 400#2a266d
  6. 500#34317f
  7. 600#444297
  8. 700#5a58c2
  9. 800#6156e8
  10. 900#6e67f9
  11. 950#b0b7ff
  12. 1000#e3e6ff

--rad-ui-color-gray-*

  1. 50#0f0f13
  2. 100#15151c
  3. 200#1d1d25
  4. 300#25262d
  5. 400#2d2e36
  6. 500#383941
  7. 600#494a52
  8. 700#61636b
  9. 800#787a83
  10. 900#878892
  11. 950#b5b7c0
  12. 1000#e9eaf5
Accent text
SampleText onRatioAA
Aa950 / 5010.16:1AAA
Aa950 / 1009.75:1AAA
Aa950 / 2008.80:1AAA
Aa1000 / 5015.64:1AAA
Aa1000 / 10015.01:1AAA
Aa1000 / 20013.55:1AAA
Aa1000 / 30012.18:1AAA
Aa1000 / 40010.67:1AAA
Gray text
SampleText onRatioAA
Aa950 / 509.56:1AAA
Aa950 / 1009.08:1AAA
Aa950 / 2008.37:1AAA
Aa1000 / 5015.99:1AAA
Aa1000 / 10015.18:1AAA
Aa1000 / 20013.99:1AAA
Aa1000 / 30012.59:1AAA
Aa1000 / 40011.28:1AAA

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.css
/* 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.