radix is a shadcn/ui theme built around a vivid orange primary color (#f66b15) with vivid blue accents (#157bf6). The light mode uses a neutral background (#f9f9f9). Dark mode switches to a neutral gray primary (#555553) on a neutral background (#fcfcfc).
| Token | Light | Dark |
|---|---|---|
| Background | #f9f9f9ghostwhite | #fcfcfcsnow |
| Foreground | #202020black | #ffffffwhite |
| Card | #fcfcfcsnow | #030303black |
| Card foreground | #202020black | #ffffffwhite |
| Popover | #fcfcfcsnow | #000000black |
| Popover foreground | #202020black | #ffffffwhite |
| Primary | #f66b15chocolate | #555553dimgray |
| Primary foreground | #ffffffwhite | #edededwhitesmoke |
| Secondary | #535455dimgray | #535455dimgray |
| Secondary foreground | #edededwhitesmoke | #edededwhitesmoke |
| Muted | #efefefwhitesmoke | #1d202bblack |
| Muted foreground | #646464dimgray | #adadaedarkgray |
| Accent | #157bf6dodgerblue | #535455dimgray |
| Accent foreground | #ffffffwhite | #edededwhitesmoke |
| Destructive | #c52202firebrick | #fd5635tomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #f2f1eewhitesmoke | #201e18black |
| Input | #f2f1eewhitesmoke | #201e18black |
| Ring | #555553dimgray | #555553dimgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 15.47:1 | AAA |
| Text on card | 15.87:1 | AAA |
| Primary button | 2.98:1 | Fail |
| Secondary button | 6.49:1 | AA |
| Muted text | 5.14:1 | AA |
| Accent | 4.04:1 | AA Large |
| Destructive | 5.82:1 | AA |
| Text on background | 1.02:1 | Fail |
| Text on card | 20.67:1 | AAA |
| Primary button | 6.41:1 | AA |
| Secondary button | 6.49:1 | AA |
| Muted text | 7.22:1 | AAA |
| Accent | 6.49:1 | AA |
| Destructive | 6.56:1 | AA |
Paste this into your globals.css to use radix in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.982 0 161.565);
--foreground: oklch(0.244 0 169.695);
--muted: oklch(0.952 0 165.964);
--muted-foreground: oklch(0.503 0 180);
--popover: oklch(0.991 0 180);
--popover-foreground: oklch(0.244 0 169.695);
--card: oklch(0.991 0 180);
--card-foreground: oklch(0.244 0 169.695);
--border: oklch(0.957 0.004 90.156);
--input: oklch(0.957 0.004 90.156);
--primary: oklch(0.689 0.19 45.166);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.445 0.002 270.082);
--secondary-foreground: oklch(0.946 0 270.117);
--accent: oklch(0.6 0.204 257.165);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.53 0.2 32.031);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.448 0.002 90.156);
--chart-1: oklch(0.689 0.19 45.166);
--chart-2: oklch(0.445 0.002 270.082);
--chart-3: oklch(0.6 0.204 257.165);
--chart-4: oklch(0.473 0.002 270.082);
--chart-5: oklch(0.693 0.195 44.608);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.991 0 180);
--foreground: oklch(1 0 180);
--muted: oklch(0.246 0.021 269.234);
--muted-foreground: oklch(0.748 0.002 270.101);
--popover: oklch(0 0 0);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.092 0 180);
--card-foreground: oklch(1 0 180);
--border: oklch(0.235 0.011 90.394);
--input: oklch(0.235 0.011 90.394);
--primary: oklch(0.448 0.002 90.156);
--primary-foreground: oklch(0.947 0 90.123);
--secondary: oklch(0.445 0.002 270.082);
--secondary-foreground: oklch(0.946 0 270.117);
--accent: oklch(0.445 0.002 270.082);
--accent-foreground: oklch(0.946 0 270.117);
--destructive: oklch(0.677 0.208 33.204);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.448 0.002 90.156);
--chart-1: oklch(0.448 0.002 90.156);
--chart-2: oklch(0.445 0.002 270.082);
--chart-3: oklch(0.445 0.002 270.082);
--chart-4: oklch(0.473 0.002 270.082);
--chart-5: oklch(0.452 0.008 90.251);
}