Elm for shadcn/ui

Elm is a shadcn/ui theme built around a green primary color (#42e43f) with green accents (#3fe48f). The light mode uses a neutral background (#fbfefb). Dark mode keeps the green primary (#42e43f) on a green-tinted background (#041004).

Color palette

TokenLightDark
Background
#fbfefbwhite
#041004black
Foreground
#030d03black
#fcfdfcwhite
Card
#f6fdf6mintcream
#051405black
Card foreground
#020802black
#ffffffwhite
Popover
#f6fdf6mintcream
#051405black
Popover foreground
#020802black
#ffffffwhite
Primary
#42e43flimegreen
#42e43flimegreen
Primary foreground
#0c4c0bdarkgreen
#0c4c0bdarkgreen
Secondary
#94e43fyellowgreen
#94e43fyellowgreen
Secondary foreground
#2c4c0bdarkgreen
#2c4c0bdarkgreen
Muted
#f0f2eewhitesmoke
#0f110dblack
Muted foreground
#5e625bdimgray
#a1a49ddarkgray
Accent
#3fe48fmediumaquamarine
#3fe48fmediumaquamarine
Accent foreground
#0b4c2adarkgreen
#0b4c2adarkgreen
Destructive
#c24b0fchocolate
#f17c41coral
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#42e43flimegreen
#42e43flimegreen

Contrast

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

Light mode
Text on background19.46:1AAA
Text on card19.62:1AAA
Primary button6.01:1AA
Secondary button6.23:1AA
Muted text5.51:1AA
Accent6.08:1AA
Destructive4.87:1AA
Dark mode
Text on background19.01:1AAA
Text on card18.89:1AAA
Primary button6.01:1AA
Secondary button6.23:1AA
Muted text7.49:1AAA
Accent6.08:1AA
Destructive7.67:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.006 145.059);
  --foreground: oklch(0.142 0.032 143.119);
  --muted: oklch(0.958 0.006 127.858);
  --muted-foreground: oklch(0.491 0.013 128.094);
  --popover: oklch(0.988 0.012 145.017);
  --popover-foreground: oklch(0.123 0.028 143.124);
  --card: oklch(0.988 0.012 145.017);
  --card-foreground: oklch(0.123 0.028 143.124);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.805 0.241 142.73);
  --primary-foreground: oklch(0.364 0.113 142.642);
  --secondary: oklch(0.836 0.207 132.157);
  --secondary-foreground: oklch(0.377 0.097 132.603);
  --accent: oklch(0.815 0.18 155.564);
  --accent-foreground: oklch(0.368 0.085 154.79);
  --destructive: oklch(0.566 0.166 41.514);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.805 0.241 142.73);
  --chart-1: oklch(0.805 0.241 142.73);
  --chart-2: oklch(0.836 0.207 132.157);
  --chart-3: oklch(0.815 0.18 155.564);
  --chart-4: oklch(0.845 0.197 131.651);
  --chart-5: oklch(0.812 0.248 142.692);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.157 0.033 143.318);
  --foreground: oklch(0.993 0.002 145.089);
  --muted: oklch(0.175 0.009 128.376);
  --muted-foreground: oklch(0.715 0.012 127.979);
  --popover: oklch(0.173 0.038 143.287);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.173 0.038 143.287);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.805 0.241 142.73);
  --primary-foreground: oklch(0.364 0.113 142.642);
  --secondary: oklch(0.836 0.207 132.157);
  --secondary-foreground: oklch(0.377 0.097 132.603);
  --accent: oklch(0.815 0.18 155.564);
  --accent-foreground: oklch(0.368 0.085 154.79);
  --destructive: oklch(0.709 0.161 45.263);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.805 0.241 142.73);
  --chart-1: oklch(0.805 0.241 142.73);
  --chart-2: oklch(0.836 0.207 132.157);
  --chart-3: oklch(0.815 0.18 155.564);
  --chart-4: oklch(0.845 0.197 131.651);
  --chart-5: oklch(0.812 0.248 142.692);
}