Root for shadcn/ui

Root is a shadcn/ui theme built around a deep blue primary color (#070d12) with deep orange accents (#120c07). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep blue primary (#070d12) on a neutral background (#020303).

Color palette

TokenLightDark
Background
#ffffffwhite
#020303black
Foreground
#000000black
#f9fafbghostwhite
Card
#ffffffwhite
#020303black
Card foreground
#000000black
#f9fafbghostwhite
Popover
#ffffffwhite
#020303black
Popover foreground
#000000black
#f9fafbghostwhite
Primary
#070d12black
#070d12black
Primary foreground
#7fa8cccornflowerblue
#7fa8cccornflowerblue
Secondary
#120c07black
#120c07black
Secondary foreground
#cca37ftan
#cca37ftan
Muted
#e5ddd7gainsboro
#28211ablack
Muted foreground
#483f37darkslategray
#c8bfb7silver
Accent
#120c07black
#120c07black
Accent foreground
#cca37ftan
#cca37ftan
Destructive
#61230amaroon
#e75318chocolate
Destructive foreground
#f6bea7lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#070d12black
#070d12black

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.78:1AAA
Secondary button8.40:1AAA
Muted text7.68:1AAA
Accent8.40:1AAA
Destructive7.34:1AAA
Dark mode
Text on background19.79:1AAA
Text on card19.79:1AAA
Primary button7.78:1AAA
Secondary button8.40:1AAA
Muted text8.77:1AAA
Accent8.40:1AAA
Destructive3.72:1AA Large

CSS variables

Paste this into your globals.css to use Root in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.903 0.013 63.912);
  --muted-foreground: oklch(0.375 0.018 63.449);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --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.156 0.015 244.21);
  --primary-foreground: oklch(0.716 0.069 245.374);
  --secondary: oklch(0.162 0.015 64.072);
  --secondary-foreground: oklch(0.745 0.069 62.65);
  --accent: oklch(0.162 0.015 64.072);
  --accent-foreground: oklch(0.745 0.069 62.65);
  --destructive: oklch(0.345 0.097 39.884);
  --destructive-foreground: oklch(0.845 0.072 42.583);
  --ring: oklch(0.156 0.015 244.21);
  --chart-1: oklch(0.156 0.015 244.21);
  --chart-2: oklch(0.162 0.015 64.072);
  --chart-3: oklch(0.162 0.015 64.072);
  --chart-4: oklch(0.2 0.022 62.274);
  --chart-5: oklch(0.156 0.016 244.057);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.09 0.006 239.108);
  --foreground: oklch(0.984 0.002 244.117);
  --muted: oklch(0.253 0.017 63.117);
  --muted-foreground: oklch(0.809 0.015 63.857);
  --popover: oklch(0.09 0.006 239.108);
  --popover-foreground: oklch(0.984 0.002 244.117);
  --card: oklch(0.09 0.006 239.108);
  --card-foreground: oklch(0.984 0.002 244.117);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.156 0.015 244.21);
  --primary-foreground: oklch(0.716 0.069 245.374);
  --secondary: oklch(0.162 0.015 64.072);
  --secondary-foreground: oklch(0.745 0.069 62.65);
  --accent: oklch(0.162 0.015 64.072);
  --accent-foreground: oklch(0.745 0.069 62.65);
  --destructive: oklch(0.635 0.194 38.677);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.156 0.015 244.21);
  --chart-1: oklch(0.156 0.015 244.21);
  --chart-2: oklch(0.162 0.015 64.072);
  --chart-3: oklch(0.162 0.015 64.072);
  --chart-4: oklch(0.2 0.022 62.274);
  --chart-5: oklch(0.156 0.016 244.057);
}