Peasant for shadcn/ui

Peasant is a shadcn/ui theme built around a deep purple primary color (#0e060e) with deep pink accents (#0e060a). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep purple primary (#0e060e) on a neutral background (#030203).

Color palette

TokenLightDark
Background
#ffffffwhite
#030203black
Foreground
#150514black
#f9f5f9whitesmoke
Card
#fcfcfcsnow
#070307black
Card foreground
#110410black
#fbf9fbsnow
Popover
#fcfcfcsnow
#070307black
Popover foreground
#110410black
#fbf9fbsnow
Primary
#0e060eblack
#0e060eblack
Primary foreground
#c97ec4orchid
#c97ec4orchid
Secondary
#0b060eblack
#0b060eblack
Secondary foreground
#a87ec9mediumpurple
#a87ec9mediumpurple
Muted
#edebeflavender
#121014black
Muted foreground
#4e4158darkslategray
#b4a7bedarkgray
Accent
#0e060ablack
#0e060ablack
Accent foreground
#c97e9epalevioletred
#c97e9epalevioletred
Destructive
#9c2b11brown
#dc3c18orangered
Destructive foreground
#fce8e3mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0e060eblack
#0e060eblack

Contrast

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

Light mode
Text on background19.74:1AAA
Text on card19.59:1AAA
Primary button6.90:1AA
Secondary button6.20:1AA
Muted text7.99:1AAA
Accent6.63:1AA
Destructive6.43:1AA
Dark mode
Text on background19.20:1AAA
Text on card19.52:1AAA
Primary button6.90:1AA
Secondary button6.20:1AA
Muted text8.31:1AAA
Accent6.63:1AA
Destructive4.44:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.151 0.043 329.86);
  --muted: oklch(0.943 0.006 311.027);
  --muted-foreground: oklch(0.398 0.041 310.18);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.137 0.038 329.629);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.137 0.038 329.629);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.14 0.023 328.902);
  --primary-foreground: oklch(0.694 0.13 329.242);
  --secondary: oklch(0.135 0.021 310.971);
  --secondary-foreground: oklch(0.662 0.118 309.485);
  --accent: oklch(0.138 0.018 350.012);
  --accent-foreground: oklch(0.68 0.102 352.602);
  --destructive: oklch(0.463 0.153 33.729);
  --destructive-foreground: oklch(0.946 0.023 32.681);
  --ring: oklch(0.14 0.023 328.902);
  --chart-1: oklch(0.14 0.023 328.902);
  --chart-2: oklch(0.135 0.021 310.971);
  --chart-3: oklch(0.138 0.018 350.012);
  --chart-4: oklch(0.167 0.032 309.334);
  --chart-5: oklch(0.14 0.025 328.999);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.089 0.011 328.326);
  --foreground: oklch(0.975 0.006 327.611);
  --muted: oklch(0.177 0.009 310.619);
  --muted-foreground: oklch(0.747 0.036 310.673);
  --popover: oklch(0.112 0.014 328.326);
  --popover-foreground: oklch(0.984 0.004 327.589);
  --card: oklch(0.112 0.014 328.326);
  --card-foreground: oklch(0.984 0.004 327.589);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.14 0.023 328.902);
  --primary-foreground: oklch(0.694 0.13 329.242);
  --secondary: oklch(0.135 0.021 310.971);
  --secondary-foreground: oklch(0.662 0.118 309.485);
  --accent: oklch(0.138 0.018 350.012);
  --accent-foreground: oklch(0.68 0.102 352.602);
  --destructive: oklch(0.594 0.202 33.553);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.14 0.023 328.902);
  --chart-1: oklch(0.14 0.023 328.902);
  --chart-2: oklch(0.135 0.021 310.971);
  --chart-3: oklch(0.138 0.018 350.012);
  --chart-4: oklch(0.167 0.032 309.334);
  --chart-5: oklch(0.14 0.025 328.999);
}