Badger for shadcn/ui

Badger is a shadcn/ui theme built around a green primary color (#90cd8e) with purple accents (#cb8ecd). The light mode uses a neutral background (#f7fdf7). Dark mode keeps the green primary (#90cd8e) on a neutral background (#030802).

Color palette

TokenLightDark
Background
#f7fdf7mintcream
#030802black
Foreground
#020902black
#f8fbf8mintcream
Card
#f4fbf3whitesmoke
#040c04black
Card foreground
#010401black
#fcfdfcwhite
Popover
#f7fdf7mintcream
#030802black
Popover foreground
#020902black
#f8fbf8mintcream
Primary
#90cd8edarkseagreen
#90cd8edarkseagreen
Primary foreground
#0d1c0cblack
#0d1c0cblack
Secondary
#cb8ecdplum
#cb8ecdplum
Secondary foreground
#1c0c1cblack
#1c0c1cblack
Muted
#eedceflavender
#221023black
Muted foreground
#4a3a4bdarkslategray
#c5b4c5silver
Accent
#cb8ecdplum
#cb8ecdplum
Accent foreground
#1c0c1cblack
#1c0c1cblack
Destructive
#c11b01firebrick
#fe2706orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#90cd8edarkseagreen
#90cd8edarkseagreen

Contrast

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

Light mode
Text on background19.47:1AAA
Text on card19.59:1AAA
Primary button9.52:1AAA
Secondary button7.39:1AAA
Muted text8.08:1AAA
Accent7.39:1AAA
Destructive6.14:1AA
Dark mode
Text on background19.40:1AAA
Text on card19.46:1AAA
Primary button9.52:1AAA
Secondary button7.39:1AAA
Muted text9.16:1AAA
Accent7.39:1AAA
Destructive3.81:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.009 144.562);
  --foreground: oklch(0.123 0.028 142.594);
  --muted: oklch(0.915 0.031 324.832);
  --muted-foreground: oklch(0.372 0.036 325.215);
  --popover: oklch(0.987 0.009 144.562);
  --popover-foreground: oklch(0.123 0.028 142.594);
  --card: oklch(0.981 0.013 144.533);
  --card-foreground: oklch(0.098 0.022 142.594);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.791 0.109 143.684);
  --primary-foreground: oklch(0.209 0.037 143.389);
  --secondary: oklch(0.727 0.113 325.533);
  --secondary-foreground: oklch(0.187 0.039 325.813);
  --accent: oklch(0.727 0.113 325.533);
  --accent-foreground: oklch(0.187 0.039 325.813);
  --destructive: oklch(0.518 0.2 31.166);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.791 0.109 143.684);
  --chart-1: oklch(0.791 0.109 143.684);
  --chart-2: oklch(0.727 0.113 325.533);
  --chart-3: oklch(0.727 0.113 325.533);
  --chart-4: oklch(0.752 0.102 325.425);
  --chart-5: oklch(0.795 0.117 143.618);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.122 0.023 143.001);
  --foreground: oklch(0.986 0.005 144.585);
  --muted: oklch(0.209 0.044 325.817);
  --muted-foreground: oklch(0.789 0.03 324.86);
  --popover: oklch(0.122 0.023 143.001);
  --popover-foreground: oklch(0.986 0.005 144.585);
  --card: oklch(0.14 0.026 143.004);
  --card-foreground: oklch(0.993 0.003 144.602);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.791 0.109 143.684);
  --primary-foreground: oklch(0.209 0.037 143.389);
  --secondary: oklch(0.727 0.113 325.533);
  --secondary-foreground: oklch(0.187 0.039 325.813);
  --accent: oklch(0.727 0.113 325.533);
  --accent-foreground: oklch(0.187 0.039 325.813);
  --destructive: oklch(0.637 0.246 30.993);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.791 0.109 143.684);
  --chart-1: oklch(0.791 0.109 143.684);
  --chart-2: oklch(0.727 0.113 325.533);
  --chart-3: oklch(0.727 0.113 325.533);
  --chart-4: oklch(0.752 0.102 325.425);
  --chart-5: oklch(0.795 0.117 143.618);
}