Badger for shadcn/ui

Badger is a shadcn/ui theme built around a muted light violet primary color (#e2e0e6) with muted light purple accents (#e5e0e6). The light mode uses a neutral background (#f9f8fc). Dark mode keeps the muted light violet primary (#e2e0e6) on a neutral background (#040208).

Color palette

TokenLightDark
Background
#f9f8fcghostwhite
#040208black
Foreground
#070212black
#fcfcfdwhite
Card
#f6f4fbghostwhite
#06030cblack
Card foreground
#06020eblack
#ffffffwhite
Popover
#f9f8fcghostwhite
#040208black
Popover foreground
#070212black
#fcfcfdwhite
Primary
#e2e0e6gainsboro
#e2e0e6gainsboro
Primary foreground
#474153darkslategray
#474153darkslategray
Secondary
#e0e1e6gainsboro
#e0e1e6gainsboro
Secondary foreground
#414453darkslategray
#414453darkslategray
Muted
#d3d7e9gainsboro
#161a2cblack
Muted foreground
#5d5e65dimgray
#9a9ca2darkgray
Accent
#e5e0e6gainsboro
#e5e0e6gainsboro
Accent foreground
#504153darkslategray
#504153darkslategray
Destructive
#821403maroon
#fb5137tomato
Destructive foreground
#fec2b9lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e2e0e6gainsboro
#e2e0e6gainsboro

Contrast

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

Light mode
Text on background19.32:1AAA
Text on card18.83:1AAA
Primary button7.44:1AAA
Secondary button7.36:1AAA
Muted text4.49:1AA Large
Accent7.24:1AAA
Destructive6.65:1AA
Dark mode
Text on background20.11:1AAA
Text on card20.44:1AAA
Primary button7.44:1AAA
Secondary button7.36:1AAA
Muted text6.28:1AA
Accent7.24:1AAA
Destructive6.33:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.006 301.395);
  --foreground: oklch(0.116 0.043 300.134);
  --muted: oklch(0.881 0.025 276.847);
  --muted-foreground: oklch(0.484 0.01 276.955);
  --popover: oklch(0.981 0.006 301.395);
  --popover-foreground: oklch(0.116 0.043 300.134);
  --card: oklch(0.971 0.009 301.344);
  --card-foreground: oklch(0.104 0.038 301.781);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.909 0.009 301.327);
  --primary-foreground: oklch(0.388 0.031 300.217);
  --secondary: oklch(0.91 0.008 277.143);
  --secondary-foreground: oklch(0.39 0.025 276.271);
  --accent: oklch(0.912 0.011 320.55);
  --accent-foreground: oklch(0.398 0.035 320.66);
  --destructive: oklch(0.391 0.147 31.699);
  --destructive-foreground: oklch(0.866 0.07 28.562);
  --ring: oklch(0.909 0.009 301.327);
  --chart-1: oklch(0.909 0.009 301.327);
  --chart-2: oklch(0.91 0.008 277.143);
  --chart-3: oklch(0.912 0.011 320.55);
  --chart-4: oklch(0.934 0.006 277.178);
  --chart-5: oklch(0.907 0.012 301.285);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.099 0.022 302.06);
  --foreground: oklch(0.991 0.002 301.467);
  --muted: oklch(0.223 0.036 274.49);
  --muted-foreground: oklch(0.692 0.009 277.068);
  --popover: oklch(0.099 0.022 302.06);
  --popover-foreground: oklch(0.991 0.002 301.467);
  --card: oklch(0.113 0.026 301.823);
  --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.909 0.009 301.327);
  --primary-foreground: oklch(0.388 0.031 300.217);
  --secondary: oklch(0.91 0.008 277.143);
  --secondary-foreground: oklch(0.39 0.025 276.271);
  --accent: oklch(0.912 0.011 320.55);
  --accent-foreground: oklch(0.398 0.035 320.66);
  --destructive: oklch(0.668 0.21 31.558);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.909 0.009 301.327);
  --chart-1: oklch(0.909 0.009 301.327);
  --chart-2: oklch(0.91 0.008 277.143);
  --chart-3: oklch(0.912 0.011 320.55);
  --chart-4: oklch(0.934 0.006 277.178);
  --chart-5: oklch(0.907 0.012 301.285);
}