Underpants for shadcn/ui

Underpants is a shadcn/ui theme built around a near-white primary color (#fcfdfc) with near-white accents (#fdfcfd). The light mode uses a neutral background (#f9fdf7). Dark mode keeps the near-white primary (#fcfdfc) on a green-tinted background (#090f06).

Color palette

TokenLightDark
Background
#f9fdf7mintcream
#090f06black
Foreground
#020401black
#f7faf5whitesmoke
Card
#f9fdf7mintcream
#090f06black
Card foreground
#020401black
#f7faf5whitesmoke
Popover
#f9fdf7mintcream
#090f06black
Popover foreground
#020401black
#f7faf5whitesmoke
Primary
#fcfdfcwhite
#fcfdfcwhite
Primary foreground
#2d3f21darkslategray
#2d3f21darkslategray
Secondary
#fdfcfdwhite
#fdfcfdwhite
Secondary foreground
#6b4582rebeccapurple
#6b4582rebeccapurple
Muted
#f0edf2whitesmoke
#100d12black
Muted foreground
#655b6bdimgray
#9d94a4darkgray
Accent
#fdfcfdwhite
#fdfcfdwhite
Accent foreground
#6b4582rebeccapurple
#6b4582rebeccapurple
Destructive
#944010saddlebrown
#eb7d3dcoral
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fcfdfcwhite
#fcfdfcwhite

Contrast

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

Light mode
Text on background19.97:1AAA
Text on card19.97:1AAA
Primary button11.18:1AAA
Secondary button7.31:1AAA
Muted text5.56:1AA
Accent7.31:1AAA
Destructive7.01:1AAA
Dark mode
Text on background18.45:1AAA
Text on card18.45:1AAA
Primary button11.18:1AAA
Secondary button7.31:1AAA
Muted text6.62:1AA
Accent7.31:1AAA
Destructive7.50:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.008 133.04);
  --foreground: oklch(0.1 0.018 131.381);
  --muted: oklch(0.951 0.007 312.936);
  --muted-foreground: oklch(0.488 0.028 312.6);
  --popover: oklch(0.989 0.008 133.04);
  --popover-foreground: oklch(0.1 0.018 131.381);
  --card: oklch(0.989 0.008 133.04);
  --card-foreground: oklch(0.1 0.018 131.381);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.994 0.002 133.001);
  --primary-foreground: oklch(0.345 0.055 134.306);
  --secondary: oklch(0.991 0.002 312.969);
  --secondary-foreground: oklch(0.459 0.105 311.287);
  --accent: oklch(0.991 0.002 312.969);
  --accent-foreground: oklch(0.459 0.105 311.287);
  --destructive: oklch(0.476 0.126 45.401);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.994 0.002 133.001);
  --chart-1: oklch(0.994 0.002 133.001);
  --chart-2: oklch(0.991 0.002 312.969);
  --chart-3: oklch(0.991 0.002 312.969);
  --chart-4: oklch(1.017 0.005 133.016);
  --chart-5: oklch(0.994 0.003 133.003);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.157 0.021 132.669);
  --foreground: oklch(0.981 0.008 133.04);
  --muted: oklch(0.165 0.011 312.554);
  --muted-foreground: oklch(0.679 0.026 312.729);
  --popover: oklch(0.157 0.021 132.669);
  --popover-foreground: oklch(0.981 0.008 133.04);
  --card: oklch(0.157 0.021 132.669);
  --card-foreground: oklch(0.981 0.008 133.04);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.994 0.002 133.001);
  --primary-foreground: oklch(0.345 0.055 134.306);
  --secondary: oklch(0.991 0.002 312.969);
  --secondary-foreground: oklch(0.459 0.105 311.287);
  --accent: oklch(0.991 0.002 312.969);
  --accent-foreground: oklch(0.459 0.105 311.287);
  --destructive: oklch(0.702 0.156 48.13);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.994 0.002 133.001);
  --chart-1: oklch(0.994 0.002 133.001);
  --chart-2: oklch(0.991 0.002 312.969);
  --chart-3: oklch(0.991 0.002 312.969);
  --chart-4: oklch(1.017 0.005 133.016);
  --chart-5: oklch(0.994 0.003 133.003);
}