Grumpy for shadcn/ui

Grumpy is a shadcn/ui theme built around a muted deep green primary color (#404234) with muted light green accents (#eaebe5). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep green primary (#404234) on a neutral background (#070703).

Color palette

TokenLightDark
Background
#ffffffwhite
#070703black
Foreground
#080901black
#fbfcf8snow
Card
#fcfcfcsnow
#0a0b04black
Card foreground
#040401black
#fdfdfcwhite
Popover
#fcfcfcsnow
#0a0b04black
Popover foreground
#040401black
#fdfdfcwhite
Primary
#404234darkslategray
#404234darkslategray
Primary foreground
#d8d9celightgrey
#d8d9celightgrey
Secondary
#eaebe5linen
#313224darkslategray
Secondary foreground
#1f2018black
#cccebbsilver
Muted
#e5e5e0gainsboro
#1e1f1ablack
Muted foreground
#676959dimgray
#a4a696darkgray
Accent
#eaebe5linen
#313224darkslategray
Accent foreground
#1f2018black
#cccebbsilver
Destructive
#a02408firebrick
#f33f16orangered
Destructive foreground
#fde3ddmistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#404234darkslategray
#404234darkslategray

Contrast

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

Light mode
Text on background20.00:1AAA
Text on card20.08:1AAA
Primary button7.22:1AAA
Secondary button13.71:1AAA
Muted text4.45:1AA Large
Accent13.71:1AAA
Destructive6.25:1AA
Dark mode
Text on background19.56:1AAA
Text on card19.40:1AAA
Primary button7.22:1AAA
Secondary button8.11:1AAA
Muted text6.71:1AA
Accent8.11:1AAA
Destructive3.80:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.134 0.024 113.291);
  --muted: oklch(0.921 0.007 111.918);
  --muted-foreground: oklch(0.513 0.024 112.642);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.107 0.019 113.291);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.107 0.019 113.291);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.372 0.023 112.94);
  --primary-foreground: oklch(0.881 0.014 112.079);
  --secondary: oklch(0.938 0.008 111.939);
  --secondary-foreground: oklch(0.239 0.014 112.83);
  --accent: oklch(0.938 0.008 111.939);
  --accent-foreground: oklch(0.239 0.014 112.83);
  --destructive: oklch(0.463 0.164 33.172);
  --destructive-foreground: oklch(0.936 0.03 32.7);
  --ring: oklch(0.372 0.023 112.94);
  --chart-1: oklch(0.372 0.023 112.94);
  --chart-2: oklch(0.938 0.008 111.939);
  --chart-3: oklch(0.938 0.008 111.939);
  --chart-4: oklch(0.959 0.005 111.883);
  --chart-5: oklch(0.377 0.029 113.194);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.127 0.014 112.777);
  --foreground: oklch(0.989 0.005 111.867);
  --muted: oklch(0.235 0.009 112.528);
  --muted-foreground: oklch(0.719 0.022 112.351);
  --popover: oklch(0.146 0.016 112.913);
  --popover-foreground: oklch(0.994 0.002 111.823);
  --card: oklch(0.146 0.016 112.913);
  --card-foreground: oklch(0.994 0.002 111.823);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.372 0.023 112.94);
  --primary-foreground: oklch(0.881 0.014 112.079);
  --secondary: oklch(0.312 0.024 113.192);
  --secondary-foreground: oklch(0.844 0.026 112.345);
  --accent: oklch(0.312 0.024 113.192);
  --accent-foreground: oklch(0.844 0.026 112.345);
  --destructive: oklch(0.635 0.221 33.318);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.372 0.023 112.94);
  --chart-1: oklch(0.372 0.023 112.94);
  --chart-2: oklch(0.312 0.024 113.192);
  --chart-3: oklch(0.312 0.024 113.192);
  --chart-4: oklch(0.346 0.027 113.239);
  --chart-5: oklch(0.377 0.029 113.194);
}