Surgery for shadcn/ui

Surgery is a shadcn/ui theme built around a neutral gray primary color (#dfe1e0) with neutral gray accents (#e1dfe1). The light mode uses a neutral background (#fbfefc). Dark mode keeps the neutral gray primary (#dfe1e0) on a neutral background (#030704).

Color palette

TokenLightDark
Background
#fbfefcwhite
#030704black
Foreground
#010402black
#fbfdfcwhite
Card
#f7fdf9mintcream
#050b07black
Card foreground
#000000black
#ffffffwhite
Popover
#f7fdf9mintcream
#050b07black
Popover foreground
#000000black
#ffffffwhite
Primary
#dfe1e0gainsboro
#dfe1e0gainsboro
Primary foreground
#454a47darkslategray
#454a47darkslategray
Secondary
#e1dfe1gainsboro
#e1dfe1gainsboro
Secondary foreground
#4a4548darkslategray
#4a4548darkslategray
Muted
#e0d7ddgainsboro
#281f25black
Muted foreground
#6a6267dimgray
#9d959adarkgray
Accent
#e1dfe1gainsboro
#e1dfe1gainsboro
Accent foreground
#4a4548darkslategray
#4a4548darkslategray
Destructive
#722608maroon
#f27340tomato
Destructive foreground
#fac7b3peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#dfe1e0gainsboro
#dfe1e0gainsboro

Contrast

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

Light mode
Text on background20.27:1AAA
Text on card20.33:1AAA
Primary button6.90:1AA
Secondary button7.11:1AAA
Muted text4.19:1AA Large
Accent7.11:1AAA
Destructive6.92:1AA
Dark mode
Text on background19.82:1AAA
Text on card19.89:1AAA
Primary button6.90:1AA
Secondary button7.11:1AAA
Muted text5.46:1AA
Accent7.11:1AAA
Destructive7.27:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.004 157.187);
  --foreground: oklch(0.099 0.017 156.85);
  --muted: oklch(0.888 0.012 337.538);
  --muted-foreground: oklch(0.505 0.013 337.787);
  --popover: oklch(0.988 0.008 157.107);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.988 0.008 157.107);
  --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.909 0.003 157.208);
  --primary-foreground: oklch(0.402 0.007 156.891);
  --secondary: oklch(0.907 0.003 337.322);
  --secondary-foreground: oklch(0.397 0.007 337.637);
  --accent: oklch(0.907 0.003 337.322);
  --accent-foreground: oklch(0.397 0.007 337.637);
  --destructive: oklch(0.381 0.114 39.036);
  --destructive-foreground: oklch(0.869 0.065 42.634);
  --ring: oklch(0.909 0.003 157.208);
  --chart-1: oklch(0.909 0.003 157.208);
  --chart-2: oklch(0.907 0.003 337.322);
  --chart-3: oklch(0.907 0.003 337.322);
  --chart-4: oklch(0.93 0.002 337.307);
  --chart-5: oklch(0.91 0.005 157.15);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.121 0.014 157.007);
  --foreground: oklch(0.993 0.003 157.211);
  --muted: oklch(0.253 0.017 338.535);
  --muted-foreground: oklch(0.678 0.012 337.628);
  --popover: oklch(0.139 0.016 156.972);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.139 0.016 156.972);
  --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.003 157.208);
  --primary-foreground: oklch(0.402 0.007 156.891);
  --secondary: oklch(0.907 0.003 337.322);
  --secondary-foreground: oklch(0.397 0.007 337.637);
  --accent: oklch(0.907 0.003 337.322);
  --accent-foreground: oklch(0.397 0.007 337.637);
  --destructive: oklch(0.697 0.17 41.052);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.909 0.003 157.208);
  --chart-1: oklch(0.909 0.003 157.208);
  --chart-2: oklch(0.907 0.003 337.322);
  --chart-3: oklch(0.907 0.003 337.322);
  --chart-4: oklch(0.93 0.002 337.307);
  --chart-5: oklch(0.91 0.005 157.15);
}