Populist for shadcn/ui

Populist is a shadcn/ui theme built around a vivid light purple primary color (#f791fd) with vivid light pink accents (#fd91cc). The light mode uses a neutral background (#fcf7fd). Dark mode keeps the vivid light purple primary (#f791fd) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcf7fdghostwhite
#000000black
Foreground
#040104black
#fdfcfdwhite
Card
#fbf3fbghostwhite
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#fcf7fdghostwhite
#000000black
Popover foreground
#040104black
#fdfcfdwhite
Primary
#f791fdviolet
#f791fdviolet
Primary foreground
#56025aindigo
#56025aindigo
Secondary
#c291fdplum
#c291fdplum
Secondary foreground
#29025amidnightblue
#29025amidnightblue
Muted
#e0dae7gainsboro
#1e1825black
Muted foreground
#5c5b5ddimgray
#a3a2a4darkgray
Accent
#fd91cclightpink
#fd91cclightpink
Accent foreground
#5a0232maroon
#5a0232maroon
Destructive
#7e1107maroon
#f44434tomato
Destructive foreground
#fbc1bblightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f791fdviolet
#f791fdviolet

Contrast

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

Light mode
Text on background19.66:1AAA
Text on card19.34:1AAA
Primary button6.72:1AA
Secondary button6.99:1AA
Muted text4.93:1AA
Accent6.77:1AA
Destructive6.83:1AA
Dark mode
Text on background20.51:1AAA
Text on card20.67:1AAA
Primary button6.72:1AA
Secondary button6.99:1AA
Muted text6.80:1AA
Accent6.77:1AA
Destructive3.66:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.009 324.184);
  --foreground: oklch(0.085 0.023 326.031);
  --muted: oklch(0.897 0.018 306.166);
  --muted-foreground: oklch(0.472 0.003 306.345);
  --popover: oklch(0.982 0.009 324.184);
  --popover-foreground: oklch(0.085 0.023 326.031);
  --card: oklch(0.973 0.014 324.211);
  --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.801 0.181 325.286);
  --primary-foreground: oklch(0.321 0.147 325.828);
  --secondary: oklch(0.745 0.157 303.562);
  --secondary-foreground: oklch(0.251 0.135 294.149);
  --accent: oklch(0.788 0.147 346.845);
  --accent-foreground: oklch(0.307 0.124 355.194);
  --destructive: oklch(0.381 0.144 30.161);
  --destructive-foreground: oklch(0.861 0.069 24.536);
  --ring: oklch(0.801 0.181 325.286);
  --chart-1: oklch(0.801 0.181 325.286);
  --chart-2: oklch(0.745 0.157 303.562);
  --chart-3: oklch(0.788 0.147 346.845);
  --chart-4: oklch(0.778 0.136 304.117);
  --chart-5: oklch(0.801 0.186 325.314);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.991 0.003 324.148);
  --muted: oklch(0.223 0.026 304.925);
  --muted-foreground: oklch(0.714 0.003 306.379);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.991 0.003 324.148);
  --card: oklch(0.092 0 180);
  --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.801 0.181 325.286);
  --primary-foreground: oklch(0.321 0.147 325.828);
  --secondary: oklch(0.745 0.157 303.562);
  --secondary-foreground: oklch(0.251 0.135 294.149);
  --accent: oklch(0.788 0.147 346.845);
  --accent-foreground: oklch(0.307 0.124 355.194);
  --destructive: oklch(0.643 0.215 29.474);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.801 0.181 325.286);
  --chart-1: oklch(0.801 0.181 325.286);
  --chart-2: oklch(0.745 0.157 303.562);
  --chart-3: oklch(0.788 0.147 346.845);
  --chart-4: oklch(0.778 0.136 304.117);
  --chart-5: oklch(0.801 0.186 325.314);
}