Royal is a shadcn/ui theme built around a vivid deep green primary color (#313a04) with vivid deep purple accents (#3a0431). The light mode uses a neutral background (#fdfefb). Dark mode keeps the vivid deep green primary (#313a04) on a neutral background (#030401).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfefbwhite | #030401black |
| Foreground | #000000black | #f9faf5whitesmoke |
| Card | #fdfefbwhite | #030401black |
| Card foreground | #000000black | #f9faf5whitesmoke |
| Popover | #fdfefbwhite | #030401black |
| Popover foreground | #000000black | #f9faf5whitesmoke |
| Primary | #313a04darkgreen | #313a04darkgreen |
| Primary foreground | #ccf019greenyellow | #ccf019greenyellow |
| Secondary | #04313adarkslategray | #04313adarkslategray |
| Secondary foreground | #19ccf0deepskyblue | #19ccf0deepskyblue |
| Muted | #eaf0f1whitesmoke | #0e1415black |
| Muted foreground | #4e5456darkslategray | #a9b0b1darkgray |
| Accent | #3a0431midnightblue | #3a0431midnightblue |
| Accent foreground | #f679e1violet | #f679e1violet |
| Destructive | #631308maroon | #ef4a34tomato |
| Destructive foreground | #f8afa5lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #313a04darkgreen | #313a04darkgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.72:1 | AAA |
| Text on card | 20.72:1 | AAA |
| Primary button | 9.29:1 | AAA |
| Secondary button | 7.30:1 | AAA |
| Muted text | 6.66:1 | AA |
| Accent | 7.06:1 | AAA |
| Destructive | 7.17:1 | AAA |
| Text on background | 19.58:1 | AAA |
| Text on card | 19.58:1 | AAA |
| Primary button | 9.29:1 | AAA |
| Secondary button | 7.30:1 | AAA |
| Muted text | 8.42:1 | AAA |
| Accent | 7.06:1 | AAA |
| Destructive | 3.69:1 | AA Large |
Paste this into your globals.css to use Royal in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.995 0.003 114.128);
--foreground: oklch(0 0 0);
--muted: oklch(0.95 0.007 211.039);
--muted-foreground: oklch(0.441 0.009 211.043);
--popover: oklch(0.995 0.003 114.128);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.995 0.003 114.128);
--card-foreground: oklch(0 0 0);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.327 0.074 119.241);
--primary-foreground: oklch(0.899 0.21 120.152);
--secondary: oklch(0.287 0.048 214.897);
--secondary-foreground: oklch(0.782 0.136 216.936);
--accent: oklch(0.241 0.099 336.226);
--accent-foreground: oklch(0.754 0.196 334.046);
--destructive: oklch(0.329 0.115 31.077);
--destructive-foreground: oklch(0.82 0.087 27.505);
--ring: oklch(0.327 0.074 119.241);
--chart-1: oklch(0.327 0.074 119.241);
--chart-2: oklch(0.287 0.048 214.897);
--chart-3: oklch(0.241 0.099 336.226);
--chart-4: oklch(0.331 0.056 215.573);
--chart-5: oklch(0.33 0.075 119.351);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.103 0.014 114.862);
--foreground: oklch(0.983 0.007 114.193);
--muted: oklch(0.187 0.009 211.147);
--muted-foreground: oklch(0.753 0.008 211.038);
--popover: oklch(0.103 0.014 114.862);
--popover-foreground: oklch(0.983 0.007 114.193);
--card: oklch(0.103 0.014 114.862);
--card-foreground: oklch(0.983 0.007 114.193);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.327 0.074 119.241);
--primary-foreground: oklch(0.899 0.21 120.152);
--secondary: oklch(0.287 0.048 214.897);
--secondary-foreground: oklch(0.782 0.136 216.936);
--accent: oklch(0.241 0.099 336.226);
--accent-foreground: oklch(0.754 0.196 334.046);
--destructive: oklch(0.64 0.205 30.793);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.327 0.074 119.241);
--chart-1: oklch(0.327 0.074 119.241);
--chart-2: oklch(0.287 0.048 214.897);
--chart-3: oklch(0.241 0.099 336.226);
--chart-4: oklch(0.331 0.056 215.573);
--chart-5: oklch(0.33 0.075 119.351);
}