Pie for shadcn/ui

Pie is a shadcn/ui theme built around a violet primary color (#a08adb) with green accents (#c5db8a). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the violet primary (#a08adb) on a violet-tinted background (#08060f).

Color palette

TokenLightDark
Background
#fcfbfewhite
#08060fblack
Foreground
#000000black
#ffffffwhite
Card
#f9f7fdghostwhite
#0a0712black
Card foreground
#000000black
#ffffffwhite
Popover
#fcfbfewhite
#08060fblack
Popover foreground
#000000black
#ffffffwhite
Primary
#a08adbmediumpurple
#a08adbmediumpurple
Primary foreground
#130c27black
#130c27black
Secondary
#c5db8atan
#c5db8atan
Secondary foreground
#20270cblack
#20270cblack
Muted
#dce0d1gainsboro
#2a2e1fdarkslategray
Muted foreground
#474c38darkslategray
#c1c7b3silver
Accent
#c5db8atan
#c5db8atan
Accent foreground
#20270cblack
#20270cblack
Destructive
#a22006firebrick
#dd2c08orangered
Destructive foreground
#fee2ddmistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a08adbmediumpurple
#a08adbmediumpurple

Contrast

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

Light mode
Text on background20.36:1AAA
Text on card19.74:1AAA
Primary button6.43:1AA
Secondary button10.23:1AAA
Muted text6.64:1AA
Accent10.23:1AAA
Destructive6.22:1AA
Dark mode
Text on background20.14:1AAA
Text on card19.93:1AAA
Primary button6.43:1AA
Secondary button10.23:1AAA
Muted text8.02:1AAA
Accent10.23:1AAA
Destructive4.72:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.004 298.501);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.901 0.021 118.973);
  --muted-foreground: oklch(0.407 0.033 119.994);
  --popover: oklch(0.99 0.004 298.501);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.979 0.007 298.434);
  --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.685 0.119 295.35);
  --primary-foreground: oklch(0.182 0.053 292.571);
  --secondary: oklch(0.857 0.108 120.875);
  --secondary-foreground: oklch(0.258 0.046 122.098);
  --accent: oklch(0.857 0.108 120.875);
  --accent-foreground: oklch(0.258 0.046 122.098);
  --destructive: oklch(0.464 0.169 32.424);
  --destructive-foreground: oklch(0.934 0.032 31.142);
  --ring: oklch(0.685 0.119 295.35);
  --chart-1: oklch(0.685 0.119 295.35);
  --chart-2: oklch(0.857 0.108 120.875);
  --chart-3: oklch(0.857 0.108 120.875);
  --chart-4: oklch(0.871 0.097 120.596);
  --chart-5: oklch(0.681 0.125 295.127);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.13 0.021 297.525);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.292 0.027 120.23);
  --muted-foreground: oklch(0.819 0.028 119.162);
  --popover: oklch(0.13 0.021 297.525);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.141 0.024 296.169);
  --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.685 0.119 295.35);
  --primary-foreground: oklch(0.182 0.053 292.571);
  --secondary: oklch(0.857 0.108 120.875);
  --secondary-foreground: oklch(0.258 0.046 122.098);
  --accent: oklch(0.857 0.108 120.875);
  --accent-foreground: oklch(0.258 0.046 122.098);
  --destructive: oklch(0.582 0.216 32.116);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.685 0.119 295.35);
  --chart-1: oklch(0.685 0.119 295.35);
  --chart-2: oklch(0.857 0.108 120.875);
  --chart-3: oklch(0.857 0.108 120.875);
  --chart-4: oklch(0.871 0.097 120.596);
  --chart-5: oklch(0.681 0.125 295.127);
}