Gruvbox Dark Soft for shadcn/ui

Gruvbox Dark Soft is a shadcn/ui theme built around a light yellow primary color (#ebdbb2) with neutral gray accents (#595654). The light mode uses a neutral background (#32302f). Dark mode keeps the light yellow primary (#ebdbb2) on a neutral background (#32302f).

Color palette

TokenLightDark
Background
#32302fdarkslategray
#32302fdarkslategray
Foreground
#ebdbb2wheat
#ebdbb2wheat
Card
#2d2b2adarkslategray
#2d2b2adarkslategray
Card foreground
#f0e4c6bisque
#f0e4c6bisque
Popover
#2a2828darkslategray
#2a2828darkslategray
Popover foreground
#f6eedbantiquewhite
#f6eedbantiquewhite
Primary
#ebdbb2wheat
#ebdbb2wheat
Primary foreground
#554316darkolivegreen
#554316darkolivegreen
Secondary
#53482ddarkolivegreen
#53482ddarkolivegreen
Secondary foreground
#e4decdgainsboro
#e4decdgainsboro
Muted
#423834darkslategray
#423834darkslategray
Muted foreground
#c2b7b2silver
#c2b7b2silver
Accent
#595654dimgray
#595654dimgray
Accent foreground
#f0f0efwhitesmoke
#f0f0efwhitesmoke
Destructive
#eb2419crimson
#eb2419crimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#3d3d3ddarkslategray
#3d3d3ddarkslategray
Input
#454545darkslategray
#454545darkslategray
Ring
#ebdbb2wheat
#ebdbb2wheat

Contrast

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

Light mode
Text on background9.57:1AAA
Text on card11.16:1AAA
Primary button6.95:1AA
Secondary button6.70:1AA
Muted text5.78:1AA
Accent6.39:1AA
Destructive4.38:1AA Large
Dark mode
Text on background9.57:1AAA
Text on card11.16:1AAA
Primary button6.95:1AA
Secondary button6.70:1AA
Muted text5.78:1AA
Accent6.39:1AA
Destructive4.38:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.311 0.003 48.623);
  --foreground: oklch(0.894 0.057 89.014);
  --muted: oklch(0.35 0.016 48.255);
  --muted-foreground: oklch(0.788 0.015 48.528);
  --popover: oklch(0.28 0.003 48.628);
  --popover-foreground: oklch(0.95 0.027 88.946);
  --card: oklch(0.29 0.003 48.626);
  --card-foreground: oklch(0.922 0.042 89);
  --border: oklch(0.361 0 180);
  --input: oklch(0.39 0 165.964);
  --primary: oklch(0.894 0.057 89.014);
  --primary-foreground: oklch(0.393 0.066 87.044);
  --secondary: oklch(0.405 0.044 88.766);
  --secondary-foreground: oklch(0.9 0.023 88.935);
  --accent: oklch(0.455 0.005 48.609);
  --accent-foreground: oklch(0.954 0.001 48.741);
  --destructive: oklch(0.602 0.231 29.257);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.894 0.057 89.014);
  --chart-1: oklch(0.894 0.057 89.014);
  --chart-2: oklch(0.405 0.044 88.766);
  --chart-3: oklch(0.455 0.005 48.609);
  --chart-4: oklch(0.438 0.049 88.746);
  --chart-5: oklch(0.896 0.059 89.012);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.311 0.003 48.623);
  --foreground: oklch(0.894 0.057 89.014);
  --muted: oklch(0.35 0.016 48.255);
  --muted-foreground: oklch(0.788 0.015 48.528);
  --popover: oklch(0.28 0.003 48.628);
  --popover-foreground: oklch(0.95 0.027 88.946);
  --card: oklch(0.29 0.003 48.626);
  --card-foreground: oklch(0.922 0.042 89);
  --border: oklch(0.361 0 180);
  --input: oklch(0.39 0 165.964);
  --primary: oklch(0.894 0.057 89.014);
  --primary-foreground: oklch(0.393 0.066 87.044);
  --secondary: oklch(0.405 0.044 88.766);
  --secondary-foreground: oklch(0.9 0.023 88.935);
  --accent: oklch(0.455 0.005 48.609);
  --accent-foreground: oklch(0.954 0.001 48.741);
  --destructive: oklch(0.602 0.231 29.257);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.894 0.057 89.014);
  --chart-1: oklch(0.894 0.057 89.014);
  --chart-2: oklch(0.405 0.044 88.766);
  --chart-3: oklch(0.455 0.005 48.609);
  --chart-4: oklch(0.438 0.049 88.746);
  --chart-5: oklch(0.896 0.059 89.012);
}