Butler for shadcn/ui

Butler is a shadcn/ui theme built around a purple primary color (#be3cad) with muted light purple accents (#dfd7de). The light mode uses a neutral background (#ffffff). Dark mode keeps the purple primary (#be3cad) on a purple-tinted background (#0f050e).

Color palette

TokenLightDark
Background
#ffffffwhite
#0f050eblack
Foreground
#040104black
#fdfcfdwhite
Card
#ffffffwhite
#0f050eblack
Card foreground
#040104black
#fdfcfdwhite
Popover
#ffffffwhite
#0f050eblack
Popover foreground
#040104black
#fdfcfdwhite
Primary
#be3cadmediumorchid
#be3cadmediumorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#dfd7degainsboro
#332431darkslategray
Secondary foreground
#4a3b48darkslategray
#cebaccthistle
Muted
#ebe6ealavender
#191419black
Muted foreground
#6f586cdimgray
#a790a4darkgray
Accent
#dfd7degainsboro
#332431darkslategray
Accent foreground
#4a3b48darkslategray
#cebaccthistle
Destructive
#8a200adarkred
#ef4a2atomato
Destructive foreground
#fbd3cbbisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#be3cadmediumorchid
#be3cadmediumorchid

Contrast

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

Light mode
Text on background20.76:1AAA
Text on card20.76:1AAA
Primary button4.73:1AA
Secondary button7.44:1AAA
Muted text5.16:1AA
Accent7.44:1AAA
Destructive6.70:1AA
Dark mode
Text on background19.54:1AAA
Text on card19.54:1AAA
Primary button4.73:1AA
Secondary button8.02:1AAA
Muted text6.18:1AA
Accent8.02:1AAA
Destructive3.68:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.085 0.021 330.96);
  --muted: oklch(0.929 0.008 329.789);
  --muted-foreground: oklch(0.49 0.044 330.74);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.085 0.021 330.96);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.085 0.021 330.96);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.583 0.206 333.724);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.889 0.013 329.856);
  --secondary-foreground: oklch(0.373 0.029 330.599);
  --accent: oklch(0.889 0.013 329.856);
  --accent-foreground: oklch(0.373 0.029 330.599);
  --destructive: oklch(0.417 0.145 32.826);
  --destructive-foreground: oklch(0.898 0.047 31.235);
  --ring: oklch(0.583 0.206 333.724);
  --chart-1: oklch(0.583 0.206 333.724);
  --chart-2: oklch(0.889 0.013 329.856);
  --chart-3: oklch(0.889 0.013 329.856);
  --chart-4: oklch(0.913 0.01 329.815);
  --chart-5: oklch(0.586 0.214 333.902);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.026 331.388);
  --foreground: oklch(0.992 0.003 329.719);
  --muted: oklch(0.201 0.012 330.376);
  --muted-foreground: oklch(0.68 0.041 330.397);
  --popover: oklch(0.139 0.026 331.388);
  --popover-foreground: oklch(0.992 0.003 329.719);
  --card: oklch(0.139 0.026 331.388);
  --card-foreground: oklch(0.992 0.003 329.719);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.583 0.206 333.724);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.283 0.031 330.966);
  --secondary-foreground: oklch(0.812 0.033 330.166);
  --accent: oklch(0.283 0.031 330.966);
  --accent-foreground: oklch(0.812 0.033 330.166);
  --destructive: oklch(0.64 0.206 33.142);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.583 0.206 333.724);
  --chart-1: oklch(0.583 0.206 333.724);
  --chart-2: oklch(0.283 0.031 330.966);
  --chart-3: oklch(0.283 0.031 330.966);
  --chart-4: oklch(0.313 0.036 331.013);
  --chart-5: oklch(0.586 0.214 333.902);
}