Royal for shadcn/ui

Royal is a shadcn/ui theme built around a deep indigo primary color (#11196e) with deep violet accents (#38116e). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the deep indigo primary (#11196e) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcfcfdwhite
#000000black
Foreground
#010209black
#f8f9fcghostwhite
Card
#fcfcfdwhite
#000000black
Card foreground
#010209black
#f8f9fcghostwhite
Popover
#fcfcfdwhite
#000000black
Popover foreground
#010209black
#f8f9fcghostwhite
Primary
#11196emidnightblue
#11196emidnightblue
Primary foreground
#bdc1f5lightsteelblue
#bdc1f5lightsteelblue
Secondary
#11486edarkslategray
#11486edarkslategray
Secondary foreground
#bdddf5powderblue
#bdddf5powderblue
Muted
#e0e9f0lavender
#0f181fblack
Muted foreground
#58656fdimgray
#909ea7darkgray
Accent
#38116emidnightblue
#38116emidnightblue
Accent foreground
#d4bdf5thistle
#d4bdf5thistle
Destructive
#b71b10firebrick
#eb2314orangered
Destructive foreground
#fffbfasnow
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#11196emidnightblue
#11196emidnightblue

Contrast

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

Light mode
Text on background20.16:1AAA
Text on card20.16:1AAA
Primary button8.71:1AAA
Secondary button6.84:1AA
Muted text4.88:1AA
Accent8.39:1AAA
Destructive6.42:1AA
Dark mode
Text on background19.94:1AAA
Text on card19.94:1AAA
Primary button8.71:1AAA
Secondary button6.84:1AA
Muted text6.51:1AA
Accent8.39:1AAA
Destructive4.40: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.991 0.002 282.179);
  --foreground: oklch(0.088 0.028 271.578);
  --muted: oklch(0.93 0.013 238.558);
  --muted-foreground: oklch(0.5 0.023 239.061);
  --popover: oklch(0.991 0.002 282.179);
  --popover-foreground: oklch(0.088 0.028 271.578);
  --card: oklch(0.991 0.002 282.179);
  --card-foreground: oklch(0.088 0.028 271.578);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.282 0.144 269.271);
  --primary-foreground: oklch(0.826 0.072 280.634);
  --secondary: oklch(0.386 0.086 244.882);
  --secondary-foreground: oklch(0.883 0.047 239.176);
  --accent: oklch(0.306 0.145 294.987);
  --accent-foreground: oklch(0.836 0.081 303.704);
  --destructive: oklch(0.5 0.19 29.66);
  --destructive-foreground: oklch(0.99 0.004 22.263);
  --ring: oklch(0.282 0.144 269.271);
  --chart-1: oklch(0.282 0.144 269.271);
  --chart-2: oklch(0.386 0.086 244.882);
  --chart-3: oklch(0.306 0.145 294.987);
  --chart-4: oklch(0.417 0.094 245.079);
  --chart-5: oklch(0.281 0.148 268.642);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.981 0.004 282.145);
  --muted: oklch(0.204 0.018 239.846);
  --muted-foreground: oklch(0.69 0.022 238.819);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.981 0.004 282.145);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.981 0.004 282.145);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.282 0.144 269.271);
  --primary-foreground: oklch(0.826 0.072 280.634);
  --secondary: oklch(0.386 0.086 244.882);
  --secondary-foreground: oklch(0.883 0.047 239.176);
  --accent: oklch(0.306 0.145 294.987);
  --accent-foreground: oklch(0.836 0.081 303.704);
  --destructive: oklch(0.601 0.231 29.708);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.282 0.144 269.271);
  --chart-1: oklch(0.282 0.144 269.271);
  --chart-2: oklch(0.386 0.086 244.882);
  --chart-3: oklch(0.306 0.145 294.987);
  --chart-4: oklch(0.417 0.094 245.079);
  --chart-5: oklch(0.281 0.148 268.642);
}