Infection for shadcn/ui

Infection is a shadcn/ui theme built around a muted light blue primary color (#b2b8d2) with muted light green accents (#b8d2b2). The light mode uses a neutral background (#f6f8fd). Dark mode keeps the muted light blue primary (#b2b8d2) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f6f8fdghostwhite
#000000black
Foreground
#020308black
#ffffffwhite
Card
#f6f8fdghostwhite
#000000black
Card foreground
#020308black
#ffffffwhite
Popover
#f6f8fdghostwhite
#000000black
Popover foreground
#020308black
#ffffffwhite
Primary
#b2b8d2lightsteelblue
#b2b8d2lightsteelblue
Primary foreground
#1e2233darkslategray
#1e2233darkslategray
Secondary
#d2b2b8silver
#d2b2b8silver
Secondary foreground
#331e22darkslategray
#331e22darkslategray
Muted
#e0dcddgainsboro
#231f20black
Muted foreground
#4a4546darkslategray
#bab5b6silver
Accent
#b8d2b2silver
#b8d2b2silver
Accent foreground
#22331edarkslategray
#22331edarkslategray
Destructive
#d05116chocolate
#e75d1dchocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b2b8d2lightsteelblue
#b2b8d2lightsteelblue

Contrast

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

Light mode
Text on background19.39:1AAA
Text on card19.39:1AAA
Primary button8.03:1AAA
Secondary button7.99:1AAA
Muted text6.92:1AA
Accent8.25:1AAA
Destructive4.32:1AA Large
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button8.03:1AAA
Secondary button7.99:1AAA
Muted text8.02:1AAA
Accent8.25:1AAA
Destructive3.50:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.979 0.007 274.942);
  --foreground: oklch(0.101 0.018 266.975);
  --muted: oklch(0.898 0.004 3.296);
  --muted-foreground: oklch(0.396 0.006 3.587);
  --popover: oklch(0.979 0.007 274.942);
  --popover-foreground: oklch(0.101 0.018 266.975);
  --card: oklch(0.979 0.007 274.942);
  --card-foreground: oklch(0.101 0.018 266.975);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.787 0.037 274.412);
  --primary-foreground: oklch(0.258 0.033 273.122);
  --secondary: oklch(0.793 0.038 4.444);
  --secondary-foreground: oklch(0.265 0.034 6.565);
  --accent: oklch(0.835 0.051 139.432);
  --accent-foreground: oklch(0.301 0.043 139.466);
  --destructive: oklch(0.596 0.173 41.006);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.787 0.037 274.412);
  --chart-1: oklch(0.787 0.037 274.412);
  --chart-2: oklch(0.793 0.038 4.444);
  --chart-3: oklch(0.835 0.051 139.432);
  --chart-4: oklch(0.819 0.033 4.242);
  --chart-5: oklch(0.784 0.041 274.328);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.245 0.005 3.752);
  --muted-foreground: oklch(0.778 0.005 3.357);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --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.787 0.037 274.412);
  --primary-foreground: oklch(0.258 0.033 273.122);
  --secondary: oklch(0.793 0.038 4.444);
  --secondary-foreground: oklch(0.265 0.034 6.565);
  --accent: oklch(0.835 0.051 139.432);
  --accent-foreground: oklch(0.301 0.043 139.466);
  --destructive: oklch(0.649 0.185 41.335);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.787 0.037 274.412);
  --chart-1: oklch(0.787 0.037 274.412);
  --chart-2: oklch(0.793 0.038 4.444);
  --chart-3: oklch(0.835 0.051 139.432);
  --chart-4: oklch(0.819 0.033 4.242);
  --chart-5: oklch(0.784 0.041 274.328);
}