Randomization is a shadcn/ui theme built around a vivid violet primary color (#8a0fcc) with vivid purple accents (#cc0fb0). The light mode uses a neutral background (#fdfcfd). Dark mode keeps the vivid violet primary (#8a0fcc) on a neutral background (#030104).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfcfdwhite | #030104black |
| Foreground | #030104black | #fdfcfdwhite |
| Card | #fdfcfdwhite | #030104black |
| Card foreground | #030104black | #fdfcfdwhite |
| Popover | #fdfcfdwhite | #030104black |
| Popover foreground | #030104black | #fdfcfdwhite |
| Primary | #8a0fccdarkviolet | #8a0fccdarkviolet |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #2c0fccmediumblue | #2c0fccmediumblue |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #e7e5f0lavender | #100f1ablack |
| Muted foreground | #53515cdimgray | #a5a3aedarkgray |
| Accent | #cc0fb0mediumvioletred | #cc0fb0mediumvioletred |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #9f2709firebrick | #ec3a0eorangered |
| Destructive foreground | #fde4ddmistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #8a0fccdarkviolet | #8a0fccdarkviolet |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.25:1 | AAA |
| Text on card | 20.25:1 | AAA |
| Primary button | 6.95:1 | AA |
| Secondary button | 10.25:1 | AAA |
| Muted text | 6.23:1 | AA |
| Accent | 4.92:1 | AA |
| Destructive | 6.24:1 | AA |
| Text on background | 20.30:1 | AAA |
| Text on card | 20.30:1 | AAA |
| Primary button | 6.95:1 | AA |
| Secondary button | 10.25:1 | AAA |
| Muted text | 7.65:1 | AAA |
| Accent | 4.92:1 | AA |
| Destructive | 4.04:1 | AA Large |
Paste this into your globals.css to use Randomization in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.003 314.205);
--foreground: oklch(0.082 0.02 316.327);
--muted: oklch(0.926 0.015 292.992);
--muted-foreground: oklch(0.442 0.017 292.578);
--popover: oklch(0.991 0.003 314.205);
--popover-foreground: oklch(0.082 0.02 316.327);
--card: oklch(0.991 0.003 314.205);
--card-foreground: oklch(0.082 0.02 316.327);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.499 0.248 307.715);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.404 0.251 271.91);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.58 0.25 336.385);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.464 0.16 33.919);
--destructive-foreground: oklch(0.937 0.029 34.303);
--ring: oklch(0.499 0.248 307.715);
--chart-1: oklch(0.499 0.248 307.715);
--chart-2: oklch(0.404 0.251 271.91);
--chart-3: oklch(0.58 0.25 336.385);
--chart-4: oklch(0.424 0.264 271.727);
--chart-5: oklch(0.502 0.252 307.344);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.082 0.019 316.168);
--foreground: oklch(0.992 0.002 314.211);
--muted: oklch(0.175 0.023 290.637);
--muted-foreground: oklch(0.72 0.015 292.914);
--popover: oklch(0.082 0.019 316.168);
--popover-foreground: oklch(0.992 0.002 314.211);
--card: oklch(0.082 0.019 316.168);
--card-foreground: oklch(0.992 0.002 314.211);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.499 0.248 307.715);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.404 0.251 271.91);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.58 0.25 336.385);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.619 0.219 33.557);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.499 0.248 307.715);
--chart-1: oklch(0.499 0.248 307.715);
--chart-2: oklch(0.404 0.251 271.91);
--chart-3: oklch(0.58 0.25 336.385);
--chart-4: oklch(0.424 0.264 271.727);
--chart-5: oklch(0.502 0.252 307.344);
}