Crown is a shadcn/ui theme built around a deep purple primary color (#6f1b65) with muted light purple accents (#d8c5d6). The light mode uses a neutral background (#fefbfe). Dark mode keeps the deep purple primary (#6f1b65) on a purple-tinted background (#0e060d).
| Token | Light | Dark |
|---|---|---|
| Background | #fefbfewhite | #0e060dblack |
| Foreground | #0c030bblack | #fdfbfdsnow |
| Card | #fefbfewhite | #0e060dblack |
| Card foreground | #0c030bblack | #fdfbfdsnow |
| Popover | #fefbfewhite | #0e060dblack |
| Popover foreground | #0c030bblack | #fdfbfdsnow |
| Primary | #6f1b65purple | #6f1b65purple |
| Primary foreground | #f2caedmistyrose | #f2caedmistyrose |
| Secondary | #e9e2e8gainsboro | #1f1f1fblack |
| Secondary foreground | #564354darkslategray | #b8b8b8silver |
| Muted | #e8c9e4thistle | #361717black |
| Muted foreground | #50494fdarkslategray | #b6afafdarkgray |
| Accent | #d8c5d6thistle | #322a2adarkslategray |
| Accent foreground | #402b3edarkslategray | #ccc2c2silver |
| Destructive | #691307maroon | #f14832tomato |
| Destructive foreground | #f9b2a9lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #6f1b65purple | #6f1b65purple |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.76:1 | AAA |
| Text on card | 19.76:1 | AAA |
| Primary button | 7.16:1 | AAA |
| Secondary button | 7.10:1 | AAA |
| Muted text | 5.79:1 | AA |
| Accent | 7.88:1 | AAA |
| Destructive | 7.06:1 | AAA |
| Text on background | 19.38:1 | AAA |
| Text on card | 19.38:1 | AAA |
| Primary button | 7.16:1 | AAA |
| Secondary button | 8.34:1 | AAA |
| Muted text | 7.55:1 | AAA |
| Accent | 8.05:1 | AAA |
| Destructive | 3.67:1 | AA Large |
Paste this into your globals.css to use Crown in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.005 329.189);
--foreground: oklch(0.124 0.028 330.587);
--muted: oklch(0.871 0.05 329.777);
--muted-foreground: oklch(0.415 0.012 329.463);
--popover: oklch(0.991 0.005 329.189);
--popover-foreground: oklch(0.124 0.028 330.587);
--card: oklch(0.991 0.005 329.189);
--card-foreground: oklch(0.124 0.028 330.587);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.39 0.145 333.195);
--primary-foreground: oklch(0.883 0.065 329.962);
--secondary: oklch(0.92 0.011 329.266);
--secondary-foreground: oklch(0.409 0.039 330.189);
--accent: oklch(0.844 0.032 329.562);
--accent-foreground: oklch(0.322 0.044 330.633);
--destructive: oklch(0.34 0.121 31.119);
--destructive-foreground: oklch(0.829 0.084 27.444);
--ring: oklch(0.39 0.145 333.195);
--chart-1: oklch(0.39 0.145 333.195);
--chart-2: oklch(0.92 0.011 329.266);
--chart-3: oklch(0.844 0.032 329.562);
--chart-4: oklch(0.944 0.007 329.223);
--chart-5: oklch(0.392 0.15 333.338);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.14 0.022 330.528);
--foreground: oklch(0.991 0.003 329.168);
--muted: oklch(0.249 0.049 21.206);
--muted-foreground: oklch(0.76 0.007 17.31);
--popover: oklch(0.14 0.022 330.528);
--popover-foreground: oklch(0.991 0.003 329.168);
--card: oklch(0.14 0.022 330.528);
--card-foreground: oklch(0.991 0.003 329.168);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.39 0.145 333.195);
--primary-foreground: oklch(0.883 0.065 329.962);
--secondary: oklch(0.238 0 161.565);
--secondary-foreground: oklch(0.781 0 180);
--accent: oklch(0.293 0.012 17.872);
--accent-foreground: oklch(0.822 0.011 17.388);
--destructive: oklch(0.642 0.209 30.85);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.39 0.145 333.195);
--chart-1: oklch(0.39 0.145 333.195);
--chart-2: oklch(0.238 0 161.565);
--chart-3: oklch(0.293 0.012 17.872);
--chart-4: oklch(0.27 0 180);
--chart-5: oklch(0.392 0.15 333.338);
}