Royal for shadcn/ui

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).

Color palette

TokenLightDark
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

Contrast

WCAG 2 contrast ratios between each background and its foreground color.

Light mode
Text on background20.72:1AAA
Text on card20.72:1AAA
Primary button9.29:1AAA
Secondary button7.30:1AAA
Muted text6.66:1AA
Accent7.06:1AAA
Destructive7.17:1AAA
Dark mode
Text on background19.58:1AAA
Text on card19.58:1AAA
Primary button9.29:1AAA
Secondary button7.30:1AAA
Muted text8.42:1AAA
Accent7.06:1AAA
Destructive3.69:1AA Large

CSS variables

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);
}