Grim for shadcn/ui

Grim is a shadcn/ui theme built around a vivid deep green primary color (#252d01) with vivid deep green accents (#102d01). The light mode uses a neutral background (#fdfefb). Dark mode keeps the vivid deep green primary (#252d01) on a neutral background (#030302).

Color palette

TokenLightDark
Background
#fdfefbwhite
#030302black
Foreground
#0b0d03black
#f9faf5whitesmoke
Card
#fdfefbwhite
#030302black
Card foreground
#0b0d03black
#f9faf5whitesmoke
Popover
#fdfefbwhite
#030302black
Popover foreground
#0b0d03black
#f9faf5whitesmoke
Primary
#252d01black
#252d01black
Primary foreground
#cbf207greenyellow
#cbf207greenyellow
Secondary
#2d1e01black
#2d1e01black
Secondary foreground
#f2a407orange
#f2a407orange
Muted
#ece6daantiquewhite
#251f13black
Muted foreground
#4b4a49darkslategray
#b6b5b4silver
Accent
#102d01black
#102d01black
Accent foreground
#56f207lawngreen
#56f207lawngreen
Destructive
#c34e13chocolate
#ec773ccoral
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#252d01black
#252d01black

Contrast

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

Light mode
Text on background19.30:1AAA
Text on card19.30:1AAA
Primary button11.21:1AAA
Secondary button7.77:1AAA
Muted text7.11:1AAA
Accent10.14:1AAA
Destructive4.75:1AA
Dark mode
Text on background19.63:1AAA
Text on card19.63:1AAA
Primary button11.21:1AAA
Secondary button7.77:1AAA
Muted text7.97:1AAA
Accent10.14:1AAA
Destructive7.24:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.003 114.128);
  --foreground: oklch(0.152 0.025 115.543);
  --muted: oklch(0.927 0.018 84.589);
  --muted-foreground: oklch(0.41 0.002 84.562);
  --popover: oklch(0.995 0.003 114.128);
  --popover-foreground: oklch(0.152 0.025 115.543);
  --card: oklch(0.995 0.003 114.128);
  --card-foreground: oklch(0.152 0.025 115.543);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.279 0.064 118.956);
  --primary-foreground: oklch(0.902 0.215 120.812);
  --secondary: oklch(0.247 0.049 81.847);
  --secondary-foreground: oklch(0.776 0.163 74.504);
  --accent: oklch(0.263 0.077 136.988);
  --accent-foreground: oklch(0.845 0.268 139.464);
  --destructive: oklch(0.571 0.163 42.142);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.279 0.064 118.956);
  --chart-1: oklch(0.279 0.064 118.956);
  --chart-2: oklch(0.247 0.049 81.847);
  --chart-3: oklch(0.263 0.077 136.988);
  --chart-4: oklch(0.293 0.059 79.892);
  --chart-5: oklch(0.281 0.065 119.045);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.099 0.009 114.587);
  --foreground: oklch(0.983 0.007 114.197);
  --muted: oklch(0.243 0.024 84.195);
  --muted-foreground: oklch(0.774 0.001 84.556);
  --popover: oklch(0.099 0.009 114.587);
  --popover-foreground: oklch(0.983 0.007 114.197);
  --card: oklch(0.099 0.009 114.587);
  --card-foreground: oklch(0.983 0.007 114.197);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.279 0.064 118.956);
  --primary-foreground: oklch(0.902 0.215 120.812);
  --secondary: oklch(0.247 0.049 81.847);
  --secondary-foreground: oklch(0.776 0.163 74.504);
  --accent: oklch(0.263 0.077 136.988);
  --accent-foreground: oklch(0.845 0.268 139.464);
  --destructive: oklch(0.694 0.161 45.046);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.279 0.064 118.956);
  --chart-1: oklch(0.279 0.064 118.956);
  --chart-2: oklch(0.247 0.049 81.847);
  --chart-3: oklch(0.263 0.077 136.988);
  --chart-4: oklch(0.293 0.059 79.892);
  --chart-5: oklch(0.281 0.065 119.045);
}