Royal is a shadcn/ui theme built around a vivid deep indigo primary color (#04045d) with vivid deep yellow accents (#5d5d04). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the vivid deep indigo primary (#04045d) on a neutral background (#020208).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfbfeghostwhite | #020208black |
| Foreground | #02020dblack | #ffffffwhite |
| Card | #fbfbfeghostwhite | #020208black |
| Card foreground | #02020dblack | #ffffffwhite |
| Popover | #fbfbfeghostwhite | #020208black |
| Popover foreground | #02020dblack | #ffffffwhite |
| Primary | #04045dmidnightblue | #04045dmidnightblue |
| Primary foreground | #9898fbmediumpurple | #9898fbmediumpurple |
| Secondary | #5d5d04darkolivegreen | #5d5d04darkolivegreen |
| Secondary foreground | #f7f736yellow | #f7f736yellow |
| Muted | #e3e3degainsboro | #21211cblack |
| Muted foreground | #5e5e5edimgray | #a1a1a1darkgray |
| Accent | #5d5d04darkolivegreen | #5d5d04darkolivegreen |
| Accent foreground | #f7f736yellow | #f7f736yellow |
| Destructive | #870303darkred | #f50505red |
| Destructive foreground | #febebelightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #04045dmidnightblue | #04045dmidnightblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.98:1 | AAA |
| Text on card | 19.98:1 | AAA |
| Primary button | 6.96:1 | AA |
| Secondary button | 6.03:1 | AA |
| Muted text | 5.02:1 | AA |
| Accent | 6.03:1 | AA |
| Destructive | 6.52:1 | AA |
| Text on background | 20.67:1 | AAA |
| Text on card | 20.67:1 | AAA |
| Primary button | 6.96:1 | AA |
| Secondary button | 6.03:1 | AA |
| Muted text | 6.25:1 | AA |
| Accent | 6.03:1 | AA |
| Destructive | 4.28:1 | AA Large |
Paste this into your globals.css to use Royal in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.989 0.004 286.327);
--foreground: oklch(0.097 0.035 277.644);
--muted: oklch(0.914 0.007 106.529);
--muted-foreground: oklch(0.483 0 180);
--popover: oklch(0.989 0.004 286.327);
--popover-foreground: oklch(0.097 0.035 277.644);
--card: oklch(0.989 0.004 286.327);
--card-foreground: oklch(0.097 0.035 277.644);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.224 0.145 266.329);
--primary-foreground: oklch(0.721 0.142 282.262);
--secondary: oklch(0.463 0.099 109.721);
--secondary-foreground: oklch(0.945 0.193 109.592);
--accent: oklch(0.463 0.099 109.721);
--accent-foreground: oklch(0.945 0.193 109.592);
--destructive: oklch(0.393 0.159 28.955);
--destructive-foreground: oklch(0.859 0.074 18.693);
--ring: oklch(0.224 0.145 266.329);
--chart-1: oklch(0.224 0.145 266.329);
--chart-2: oklch(0.463 0.099 109.721);
--chart-3: oklch(0.463 0.099 109.721);
--chart-4: oklch(0.513 0.11 109.728);
--chart-5: oklch(0.223 0.148 265.488);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.094 0.022 281.233);
--foreground: oklch(1 0 180);
--muted: oklch(0.246 0.009 107.044);
--muted-foreground: oklch(0.708 0 158.199);
--popover: oklch(0.094 0.022 281.233);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.094 0.022 281.233);
--card-foreground: oklch(1 0 180);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.224 0.145 266.329);
--primary-foreground: oklch(0.721 0.142 282.262);
--secondary: oklch(0.463 0.099 109.721);
--secondary-foreground: oklch(0.945 0.193 109.592);
--accent: oklch(0.463 0.099 109.721);
--accent-foreground: oklch(0.945 0.193 109.592);
--destructive: oklch(0.61 0.249 29.098);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.224 0.145 266.329);
--chart-1: oklch(0.224 0.145 266.329);
--chart-2: oklch(0.463 0.099 109.721);
--chart-3: oklch(0.463 0.099 109.721);
--chart-4: oklch(0.513 0.11 109.728);
--chart-5: oklch(0.223 0.148 265.488);
}