Underground for shadcn/ui

Underground is a shadcn/ui theme built around a deep red primary color (#68272d) with deep blue accents (#272d68). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep red primary (#68272d) on a red-tinted background (#0b0405).

Color palette

TokenLightDark
Background
#ffffffwhite
#0b0405black
Foreground
#080203black
#fbf9f9snow
Card
#ffffffwhite
#0b0405black
Card foreground
#080203black
#fbf9f9snow
Popover
#ffffffwhite
#0b0405black
Popover foreground
#080203black
#fbf9f9snow
Primary
#68272dsaddlebrown
#68272dsaddlebrown
Primary foreground
#eed2d5gainsboro
#eed2d5gainsboro
Secondary
#2d6827forestgreen
#2d6827forestgreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e3efe1beige
#111e10black
Muted foreground
#3d4e3bdarkslategray
#b2c4b1silver
Accent
#272d68midnightblue
#272d68midnightblue
Accent foreground
#d2d5eegainsboro
#d2d5eegainsboro
Destructive
#d11500firebrick
#ff3a24orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#68272dsaddlebrown
#68272dsaddlebrown

Contrast

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

Light mode
Text on background20.58:1AAA
Text on card20.58:1AAA
Primary button7.74:1AAA
Secondary button6.70:1AA
Muted text7.51:1AAA
Accent8.71:1AAA
Destructive5.49:1AA
Dark mode
Text on background19.33:1AAA
Text on card19.33:1AAA
Primary button7.74:1AAA
Secondary button6.70:1AA
Muted text9.39:1AAA
Accent8.71:1AAA
Destructive3.57:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.104 0.019 11.609);
  --muted: oklch(0.939 0.023 142.529);
  --muted-foreground: oklch(0.405 0.039 142.236);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.104 0.019 11.609);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.104 0.019 11.609);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.369 0.094 16.978);
  --primary-foreground: oklch(0.889 0.032 10.888);
  --secondary: oklch(0.463 0.116 141.703);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.328 0.103 274.495);
  --accent-foreground: oklch(0.879 0.035 280.618);
  --destructive: oklch(0.546 0.217 30.411);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.369 0.094 16.978);
  --chart-1: oklch(0.369 0.094 16.978);
  --chart-2: oklch(0.463 0.116 141.703);
  --chart-3: oklch(0.328 0.103 274.495);
  --chart-4: oklch(0.497 0.126 141.699);
  --chart-5: oklch(0.369 0.1 17.555);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.015 11.077);
  --foreground: oklch(0.983 0.002 10.133);
  --muted: oklch(0.218 0.032 142.034);
  --muted-foreground: oklch(0.801 0.033 142.46);
  --popover: oklch(0.123 0.015 11.077);
  --popover-foreground: oklch(0.983 0.002 10.133);
  --card: oklch(0.123 0.015 11.077);
  --card-foreground: oklch(0.983 0.002 10.133);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.369 0.094 16.978);
  --primary-foreground: oklch(0.889 0.032 10.888);
  --secondary: oklch(0.463 0.116 141.703);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.328 0.103 274.495);
  --accent-foreground: oklch(0.879 0.035 280.618);
  --destructive: oklch(0.652 0.234 30.479);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.369 0.094 16.978);
  --chart-1: oklch(0.369 0.094 16.978);
  --chart-2: oklch(0.463 0.116 141.703);
  --chart-3: oklch(0.328 0.103 274.495);
  --chart-4: oklch(0.497 0.126 141.699);
  --chart-5: oklch(0.369 0.1 17.555);
}