Petticoat for shadcn/ui

Petticoat is a shadcn/ui theme built around a neutral gray primary color (#677066) with muted light green accents (#cbd3ca). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#677066) on a green-tinted background (#050b04).

Color palette

TokenLightDark
Background
#ffffffwhite
#050b04black
Foreground
#041202black
#f6f9f5whitesmoke
Card
#fcfcfcsnow
#070e06black
Card foreground
#030e02black
#f9fbf8mintcream
Popover
#ffffffwhite
#050b04black
Popover foreground
#041202black
#f6f9f5whitesmoke
Primary
#677066dimgray
#677066dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#cbd3calightgrey
#1a1e1ablack
Secondary foreground
#323a31darkslategray
#b0bbafdarkgray
Muted
#d2e1d1lightgrey
#202e1edarkslategray
Muted foreground
#495148darkslategray
#afb7aedarkgray
Accent
#cbd3calightgrey
#1a1e1ablack
Accent foreground
#323a31darkslategray
#b0bbafdarkgray
Destructive
#9d3801saddlebrown
#f45601orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#677066dimgray
#677066dimgray

Contrast

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

Light mode
Text on background19.22:1AAA
Text on card19.24:1AAA
Primary button5.11:1AA
Secondary button7.67:1AAA
Muted text6.03:1AA
Accent7.67:1AAA
Destructive7.00:1AAA
Dark mode
Text on background18.74:1AAA
Text on card18.74:1AAA
Primary button5.11:1AA
Secondary button8.47:1AAA
Muted text6.92:1AA
Accent8.47:1AAA
Destructive3.40:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.163 0.043 140.494);
  --muted: oklch(0.894 0.027 142.506);
  --muted-foreground: oklch(0.425 0.018 142.451);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.163 0.043 140.494);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.145 0.037 140.29);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.535 0.02 142.473);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.858 0.015 142.558);
  --secondary-foreground: oklch(0.339 0.02 142.381);
  --accent: oklch(0.858 0.015 142.558);
  --accent-foreground: oklch(0.339 0.02 142.381);
  --destructive: oklch(0.479 0.146 41.368);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.535 0.02 142.473);
  --chart-1: oklch(0.535 0.02 142.473);
  --chart-2: oklch(0.858 0.015 142.558);
  --chart-3: oklch(0.858 0.015 142.558);
  --chart-4: oklch(0.881 0.012 142.571);
  --chart-5: oklch(0.54 0.032 142.383);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.02 141.346);
  --foreground: oklch(0.979 0.007 142.598);
  --muted: oklch(0.284 0.035 142.123);
  --muted-foreground: oklch(0.771 0.016 142.544);
  --popover: oklch(0.139 0.02 141.346);
  --popover-foreground: oklch(0.979 0.007 142.598);
  --card: oklch(0.154 0.023 141.489);
  --card-foreground: oklch(0.986 0.005 142.608);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.535 0.02 142.473);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.23 0.01 142.442);
  --secondary-foreground: oklch(0.78 0.02 142.521);
  --accent: oklch(0.23 0.01 142.442);
  --accent-foreground: oklch(0.78 0.02 142.521);
  --destructive: oklch(0.659 0.206 40.116);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.535 0.02 142.473);
  --chart-1: oklch(0.535 0.02 142.473);
  --chart-2: oklch(0.23 0.01 142.442);
  --chart-3: oklch(0.23 0.01 142.442);
  --chart-4: oklch(0.264 0.013 142.428);
  --chart-5: oklch(0.54 0.032 142.383);
}