Surgeon for shadcn/ui

Surgeon is a shadcn/ui theme built around a green primary color (#7eab59) with muted light green accents (#e8ebe6). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#7eab59) on a neutral background (#050803).

Color palette

TokenLightDark
Background
#ffffffwhite
#050803black
Foreground
#020401black
#fcfdfcwhite
Card
#fcfcfcsnow
#070b04black
Card foreground
#000000black
#ffffffwhite
Popover
#fcfcfcsnow
#070b04black
Popover foreground
#000000black
#ffffffwhite
Primary
#7eab59gray
#7eab59gray
Primary foreground
#000000black
#000000black
Secondary
#e8ebe6linen
#262825darkslategray
Secondary foreground
#4e5846darkolivegreen
#bfc2bdsilver
Muted
#f2f5f0whitesmoke
#0d0f0ablack
Muted foreground
#4d4d4ddarkslategray
#b3b3b3darkgray
Accent
#e8ebe6linen
#262825darkslategray
Accent foreground
#4e5846darkolivegreen
#bfc2bdsilver
Destructive
#83140cmaroon
#ec3e32crimson
Destructive foreground
#facac7pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7eab59gray
#7eab59gray

Contrast

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

Light mode
Text on background20.58:1AAA
Text on card20.54:1AAA
Primary button7.87:1AAA
Secondary button6.19:1AA
Muted text7.66:1AAA
Accent6.19:1AA
Destructive6.94:1AA
Dark mode
Text on background19.79:1AAA
Text on card19.80:1AAA
Primary button7.87:1AAA
Secondary button8.27:1AAA
Muted text9.18:1AAA
Accent8.27:1AAA
Destructive3.96:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.101 0.017 129.031);
  --muted: oklch(0.966 0.007 130.506);
  --muted-foreground: oklch(0.418 0 173.29);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.69 0.122 132.468);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.935 0.007 130.512);
  --secondary-foreground: oklch(0.446 0.03 131.098);
  --accent: oklch(0.935 0.007 130.512);
  --accent-foreground: oklch(0.446 0.03 131.098);
  --destructive: oklch(0.394 0.146 29.507);
  --destructive-foreground: oklch(0.88 0.054 23.004);
  --ring: oklch(0.69 0.122 132.468);
  --chart-1: oklch(0.69 0.122 132.468);
  --chart-2: oklch(0.935 0.007 130.512);
  --chart-3: oklch(0.935 0.007 130.512);
  --chart-4: oklch(0.957 0.005 130.486);
  --chart-5: oklch(0.699 0.132 132.661);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.017 129.304);
  --foreground: oklch(0.993 0.001 130.448);
  --muted: oklch(0.164 0.011 131.078);
  --muted-foreground: oklch(0.765 0 172.405);
  --popover: oklch(0.143 0.02 129.405);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.143 0.02 129.405);
  --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.69 0.122 132.468);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.273 0.006 130.647);
  --secondary-foreground: oklch(0.81 0.008 130.527);
  --accent: oklch(0.273 0.006 130.647);
  --accent-foreground: oklch(0.81 0.008 130.527);
  --destructive: oklch(0.624 0.212 28.84);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.69 0.122 132.468);
  --chart-1: oklch(0.69 0.122 132.468);
  --chart-2: oklch(0.273 0.006 130.647);
  --chart-3: oklch(0.273 0.006 130.647);
  --chart-4: oklch(0.305 0.007 130.657);
  --chart-5: oklch(0.699 0.132 132.661);
}