Petticoat for shadcn/ui

Petticoat is a shadcn/ui theme built around a muted green primary color (#949d58) with muted green accents (#719d58). The light mode uses a neutral background (#fdfdfb). Dark mode keeps the muted green primary (#949d58) on a neutral background (#040401).

Color palette

TokenLightDark
Background
#fdfdfbsnow
#040401black
Foreground
#000000black
#fbfbf9snow
Card
#fbfcf8snow
#070802black
Card foreground
#000000black
#fdfdfcwhite
Popover
#fdfdfbsnow
#040401black
Popover foreground
#000000black
#fbfbf9snow
Primary
#949d58darkkhaki
#949d58darkkhaki
Primary foreground
#191a0fblack
#191a0fblack
Secondary
#9d8458gray
#9d8458gray
Secondary foreground
#000000black
#000000black
Muted
#f1eee9linen
#16130eblack
Muted foreground
#6f685ddimgray
#a29b90rosybrown
Accent
#719d58gray
#719d58gray
Accent foreground
#000000black
#000000black
Destructive
#d5370borangered
#df390corangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#949d58darkkhaki
#949d58darkkhaki

Contrast

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

Light mode
Text on background20.69:1AAA
Text on card20.39:1AAA
Primary button6.01:1AA
Secondary button5.84:1AA
Muted text4.76:1AA
Accent6.64:1AA
Destructive4.78:1AA
Dark mode
Text on background19.82:1AAA
Text on card19.74:1AAA
Primary button6.01:1AA
Secondary button5.84:1AA
Muted text6.73:1AA
Accent6.64:1AA
Destructive4.43:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.003 112.596);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.951 0.008 81.511);
  --muted-foreground: oklch(0.522 0.02 81.443);
  --popover: oklch(0.995 0.003 112.596);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.989 0.006 112.648);
  --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.672 0.093 115.163);
  --primary-foreground: oklch(0.213 0.021 114.411);
  --secondary: oklch(0.625 0.067 80.673);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.646 0.107 134.884);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.576 0.2 34.25);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.672 0.093 115.163);
  --chart-1: oklch(0.672 0.093 115.163);
  --chart-2: oklch(0.625 0.067 80.673);
  --chart-3: oklch(0.646 0.107 134.884);
  --chart-4: oklch(0.651 0.068 80.733);
  --chart-5: oklch(0.682 0.101 115.379);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.103 0.015 113.632);
  --foreground: oklch(0.987 0.003 112.595);
  --muted: oklch(0.188 0.011 81.315);
  --muted-foreground: oklch(0.693 0.018 81.481);
  --popover: oklch(0.103 0.015 113.632);
  --popover-foreground: oklch(0.987 0.003 112.595);
  --card: oklch(0.13 0.018 113.632);
  --card-foreground: oklch(0.994 0.001 112.569);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.672 0.093 115.163);
  --primary-foreground: oklch(0.213 0.021 114.411);
  --secondary: oklch(0.625 0.067 80.673);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.646 0.107 134.884);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.595 0.208 34.206);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.672 0.093 115.163);
  --chart-1: oklch(0.672 0.093 115.163);
  --chart-2: oklch(0.625 0.067 80.673);
  --chart-3: oklch(0.646 0.107 134.884);
  --chart-4: oklch(0.651 0.068 80.733);
  --chart-5: oklch(0.682 0.101 115.379);
}