Healthy Warm Purple for shadcn/ui

Healthy Warm Purple is a shadcn/ui theme built around a purple primary color (#963693) with muted purple accents (#bbaaba). The light mode uses a neutral background (#fdfbfd). Dark mode keeps the purple primary (#963693) on a purple-tinted background (#0c030c).

Color palette

TokenLightDark
Background
#fdfbfdsnow
#0c030cblack
Foreground
#090109black
#fdfcfdwhite
Card
#fdfbfdsnow
#0c030cblack
Card foreground
#090109black
#fdfcfdwhite
Popover
#fdfbfdsnow
#0c030cblack
Popover foreground
#090109black
#fdfcfdwhite
Primary
#963693rebeccapurple
#963693rebeccapurple
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#cfc9cflightgrey
#291f28darkslategray
Secondary foreground
#363036darkslategray
#c6b3c5silver
Muted
#e2dfe2gainsboro
#201d20black
Muted foreground
#634b62dimgray
#b49cb4darkgray
Accent
#bbaabasilver
#422941darkslategray
Accent foreground
#1c171cblack
#dac3d9thistle
Destructive
#c83814firebrick
#e9451corangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e6e0e6gainsboro
#1c171cblack
Input
#e6e0e6gainsboro
#1c171cblack
Ring
#963693rebeccapurple
#963693rebeccapurple

Contrast

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

Light mode
Text on background20.06:1AAA
Text on card20.06:1AAA
Primary button6.47:1AA
Secondary button7.90:1AAA
Muted text5.84:1AA
Accent8.05:1AAA
Destructive5.23:1AA
Dark mode
Text on background19.81:1AAA
Text on card19.81:1AAA
Primary button6.47:1AA
Secondary button8.09:1AAA
Muted text6.64:1AA
Accent7.85:1AAA
Destructive3.95:1AA Large

CSS variables

Paste this into your globals.css to use Healthy Warm Purple in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 326.571);
  --foreground: oklch(0.105 0.035 328.561);
  --muted: oklch(0.906 0.006 326.6);
  --muted-foreground: oklch(0.445 0.049 327.438);
  --popover: oklch(0.991 0.003 326.571);
  --popover-foreground: oklch(0.105 0.035 328.561);
  --card: oklch(0.991 0.003 326.571);
  --card-foreground: oklch(0.105 0.035 328.561);
  --border: oklch(0.913 0.01 326.639);
  --input: oklch(0.913 0.01 326.639);
  --primary: oklch(0.504 0.17 329.093);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.842 0.011 326.649);
  --secondary-foreground: oklch(0.318 0.013 326.899);
  --accent: oklch(0.758 0.03 326.874);
  --accent-foreground: oklch(0.212 0.014 327.078);
  --destructive: oklch(0.553 0.186 34.229);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.504 0.17 329.093);
  --chart-1: oklch(0.504 0.17 329.093);
  --chart-2: oklch(0.842 0.011 326.649);
  --chart-3: oklch(0.758 0.03 326.874);
  --chart-4: oklch(0.866 0.009 326.629);
  --chart-5: oklch(0.507 0.178 329.198);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.029 328.097);
  --foreground: oklch(0.992 0.002 326.554);
  --muted: oklch(0.235 0.009 326.855);
  --muted-foreground: oklch(0.722 0.043 327.046);
  --popover: oklch(0.124 0.029 328.097);
  --popover-foreground: oklch(0.992 0.002 326.554);
  --card: oklch(0.124 0.029 328.097);
  --card-foreground: oklch(0.992 0.002 326.554);
  --border: oklch(0.212 0.014 327.078);
  --input: oklch(0.212 0.014 327.078);
  --primary: oklch(0.504 0.17 329.093);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.254 0.023 327.295);
  --secondary-foreground: oklch(0.789 0.032 326.89);
  --accent: oklch(0.322 0.053 327.861);
  --accent-foreground: oklch(0.844 0.038 326.925);
  --destructive: oklch(0.623 0.207 34.355);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.504 0.17 329.093);
  --chart-1: oklch(0.504 0.17 329.093);
  --chart-2: oklch(0.254 0.023 327.295);
  --chart-3: oklch(0.322 0.053 327.861);
  --chart-4: oklch(0.285 0.027 327.333);
  --chart-5: oklch(0.507 0.178 329.198);
}