Gruvbox Material Dark for shadcn/ui

Gruvbox Material Dark is a shadcn/ui theme built around a muted orange primary color (#a89985) with neutral gray accents (#504e4e). The light mode uses a neutral background (#292828). Dark mode keeps the muted orange primary (#a89985) on a neutral background (#292828).

Color palette

TokenLightDark
Background
#292828darkslategray
#292828darkslategray
Foreground
#d3bd97tan
#d3bd97tan
Card
#242323black
#242323black
Card foreground
#dbc8a9wheat
#dbc8a9wheat
Popover
#212121black
#212121black
Popover foreground
#e2d4bbwheat
#e2d4bbwheat
Primary
#a89985rosybrown
#a89985rosybrown
Primary foreground
#000000black
#000000black
Secondary
#44403bdarkslategray
#44403bdarkslategray
Secondary foreground
#dbd9d6gainsboro
#dbd9d6gainsboro
Muted
#392d2ddarkslategray
#392d2ddarkslategray
Muted foreground
#bca9a9darkgray
#bca9a9darkgray
Accent
#504e4edarkslategray
#504e4edarkslategray
Accent foreground
#e8e8e8lavender
#e8e8e8lavender
Destructive
#ed5e45tomato
#ed5e45tomato
Destructive foreground
#000000black
#000000black
Border
#363636darkslategray
#363636darkslategray
Input
#3d3d3ddarkslategray
#3d3d3ddarkslategray
Ring
#a89985rosybrown
#a89985rosybrown

Contrast

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

Light mode
Text on background8.01:1AAA
Text on card9.55:1AAA
Primary button7.59:1AAA
Secondary button7.25:1AAA
Muted text5.91:1AA
Accent6.72:1AA
Destructive6.29:1AA
Dark mode
Text on background8.01:1AAA
Text on card9.55:1AAA
Primary button7.59:1AAA
Secondary button7.25:1AAA
Muted text5.91:1AA
Accent6.72:1AA
Destructive6.29:1AA

CSS variables

Paste this into your globals.css to use Gruvbox Material Dark in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.279 0.001 17.229);
  --foreground: oklch(0.808 0.057 81.216);
  --muted: oklch(0.31 0.018 18.169);
  --muted-foreground: oklch(0.752 0.021 17.636);
  --popover: oklch(0.248 0.001 17.225);
  --popover-foreground: oklch(0.875 0.037 81.421);
  --card: oklch(0.258 0.001 17.226);
  --card-foreground: oklch(0.841 0.047 81.34);
  --border: oklch(0.331 0 180);
  --input: oklch(0.361 0 180);
  --primary: oklch(0.691 0.034 76.314);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.375 0.01 76.504);
  --secondary-foreground: oklch(0.887 0.005 76.627);
  --accent: oklch(0.426 0.002 17.239);
  --accent-foreground: oklch(0.931 0 17.167);
  --destructive: oklch(0.662 0.181 32.127);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.691 0.034 76.314);
  --chart-1: oklch(0.691 0.034 76.314);
  --chart-2: oklch(0.375 0.01 76.504);
  --chart-3: oklch(0.426 0.002 17.239);
  --chart-4: oklch(0.405 0.011 76.5);
  --chart-5: oklch(0.695 0.04 76.226);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.279 0.001 17.229);
  --foreground: oklch(0.808 0.057 81.216);
  --muted: oklch(0.31 0.018 18.169);
  --muted-foreground: oklch(0.752 0.021 17.636);
  --popover: oklch(0.248 0.001 17.225);
  --popover-foreground: oklch(0.875 0.037 81.421);
  --card: oklch(0.258 0.001 17.226);
  --card-foreground: oklch(0.841 0.047 81.34);
  --border: oklch(0.331 0 180);
  --input: oklch(0.361 0 180);
  --primary: oklch(0.691 0.034 76.314);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.375 0.01 76.504);
  --secondary-foreground: oklch(0.887 0.005 76.627);
  --accent: oklch(0.426 0.002 17.239);
  --accent-foreground: oklch(0.931 0 17.167);
  --destructive: oklch(0.662 0.181 32.127);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.691 0.034 76.314);
  --chart-1: oklch(0.691 0.034 76.314);
  --chart-2: oklch(0.375 0.01 76.504);
  --chart-3: oklch(0.426 0.002 17.239);
  --chart-4: oklch(0.405 0.011 76.5);
  --chart-5: oklch(0.695 0.04 76.226);
}