Elk for shadcn/ui

Elk is a shadcn/ui theme built around a vivid green primary color (#8bd11a) with muted light green accents (#e4e7de). The light mode uses a neutral background (#fbfdf7). Dark mode keeps the vivid green primary (#8bd11a) on a green-tinted background (#080b05).

Color palette

TokenLightDark
Background
#fbfdf7snow
#080b05black
Foreground
#090d03black
#fdfdfbsnow
Card
#fbfdf7snow
#080b05black
Card foreground
#090d03black
#fdfdfbsnow
Popover
#fbfdf7snow
#080b05black
Popover foreground
#090d03black
#fdfdfbsnow
Primary
#8bd11ayellowgreen
#8bd11ayellowgreen
Primary foreground
#121b03black
#121b03black
Secondary
#e4e7degainsboro
#2f312bdarkslategray
Secondary foreground
#4d563edarkolivegreen
#c8cbc3silver
Muted
#f0f3edwhitesmoke
#10120cblack
Muted foreground
#494c42darkslategray
#b9bdb3silver
Accent
#e4e7degainsboro
#2f312bdarkslategray
Accent foreground
#4d563edarkolivegreen
#c8cbc3silver
Destructive
#bf1c03firebrick
#fc3f22orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8bd11ayellowgreen
#8bd11ayellowgreen

Contrast

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

Light mode
Text on background19.14:1AAA
Text on card19.14:1AAA
Primary button9.46:1AAA
Secondary button6.19:1AA
Muted text7.81:1AAA
Accent6.19:1AA
Destructive6.21:1AA
Dark mode
Text on background19.46:1AAA
Text on card19.46:1AAA
Primary button9.46:1AAA
Secondary button8.01:1AAA
Muted text9.84:1AAA
Accent8.01:1AAA
Destructive3.58:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.009 123.772);
  --foreground: oklch(0.149 0.025 123.379);
  --muted: oklch(0.96 0.008 123.77);
  --muted-foreground: oklch(0.411 0.017 124.259);
  --popover: oklch(0.991 0.009 123.772);
  --popover-foreground: oklch(0.149 0.025 123.379);
  --card: oklch(0.991 0.009 123.772);
  --card-foreground: oklch(0.149 0.025 123.379);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.784 0.205 130.198);
  --primary-foreground: oklch(0.207 0.045 126.791);
  --secondary: oklch(0.924 0.013 123.841);
  --secondary-foreground: oklch(0.437 0.039 125.018);
  --accent: oklch(0.924 0.013 123.841);
  --accent-foreground: oklch(0.437 0.039 125.018);
  --destructive: oklch(0.515 0.198 31.188);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.784 0.205 130.198);
  --chart-1: oklch(0.784 0.205 130.198);
  --chart-2: oklch(0.924 0.013 123.841);
  --chart-3: oklch(0.924 0.013 123.841);
  --chart-4: oklch(0.945 0.009 123.782);
  --chart-5: oklch(0.793 0.21 130.438);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.143 0.016 123.226);
  --foreground: oklch(0.994 0.003 123.68);
  --muted: oklch(0.179 0.013 124.722);
  --muted-foreground: oklch(0.791 0.014 123.912);
  --popover: oklch(0.143 0.016 123.226);
  --popover-foreground: oklch(0.994 0.003 123.68);
  --card: oklch(0.143 0.016 123.226);
  --card-foreground: oklch(0.994 0.003 123.68);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.784 0.205 130.198);
  --primary-foreground: oklch(0.207 0.045 126.791);
  --secondary: oklch(0.309 0.012 124.209);
  --secondary-foreground: oklch(0.837 0.011 123.839);
  --accent: oklch(0.309 0.012 124.209);
  --accent-foreground: oklch(0.837 0.011 123.839);
  --destructive: oklch(0.651 0.228 31.637);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.784 0.205 130.198);
  --chart-1: oklch(0.784 0.205 130.198);
  --chart-2: oklch(0.309 0.012 124.209);
  --chart-3: oklch(0.309 0.012 124.209);
  --chart-4: oklch(0.34 0.013 124.228);
  --chart-5: oklch(0.793 0.21 130.438);
}