Purple for shadcn/ui

Purple is a shadcn/ui theme built around a muted deep teal primary color (#43514f) with muted deep red accents (#514345). The light mode uses a neutral background (#fcfdfd). Dark mode keeps the muted deep teal primary (#43514f) on a neutral background (#020807).

Color palette

TokenLightDark
Background
#fcfdfdwhite
#020807black
Foreground
#010404black
#f9fbfbghostwhite
Card
#fcfdfdwhite
#020807black
Card foreground
#010404black
#f9fbfbghostwhite
Popover
#fcfdfdwhite
#020807black
Popover foreground
#010404black
#f9fbfbghostwhite
Primary
#43514fdarkslategray
#43514fdarkslategray
Primary foreground
#e0e5e5gainsboro
#e0e5e5gainsboro
Secondary
#514345darkslategray
#514345darkslategray
Secondary foreground
#e5e0e1gainsboro
#e5e0e1gainsboro
Muted
#ecdadcgainsboro
#251315black
Muted foreground
#5c5757dimgray
#a8a3a4darkgray
Accent
#514345darkslategray
#514345darkslategray
Accent foreground
#e5e0e1gainsboro
#e5e0e1gainsboro
Destructive
#c83804firebrick
#f54505orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e7e9e9lavender
#252727darkslategray
Input
#e7e9e9lavender
#252727darkslategray
Ring
#43514fdarkslategray
#43514fdarkslategray

Contrast

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

Light mode
Text on background20.22:1AAA
Text on card20.22:1AAA
Primary button6.55:1AA
Secondary button7.17:1AAA
Muted text5.27:1AA
Accent7.17:1AAA
Destructive5.21:1AA
Dark mode
Text on background19.43:1AAA
Text on card19.43:1AAA
Primary button6.55:1AA
Secondary button7.17:1AAA
Muted text7.13:1AAA
Accent7.17:1AAA
Destructive3.66:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.002 188.862);
  --foreground: oklch(0.101 0.014 188.148);
  --muted: oklch(0.903 0.021 9.449);
  --muted-foreground: oklch(0.461 0.007 9.27);
  --popover: oklch(0.994 0.002 188.862);
  --popover-foreground: oklch(0.101 0.014 188.148);
  --card: oklch(0.994 0.002 188.862);
  --card-foreground: oklch(0.101 0.014 188.148);
  --border: oklch(0.932 0.001 188.872);
  --input: oklch(0.932 0.001 188.872);
  --primary: oklch(0.421 0.017 187.929);
  --primary-foreground: oklch(0.919 0.005 188.768);
  --secondary: oklch(0.398 0.018 10.001);
  --secondary-foreground: oklch(0.912 0.006 9.054);
  --accent: oklch(0.398 0.018 10.001);
  --accent-foreground: oklch(0.912 0.006 9.054);
  --destructive: oklch(0.554 0.187 36.067);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.421 0.017 187.929);
  --chart-1: oklch(0.421 0.017 187.929);
  --chart-2: oklch(0.398 0.018 10.001);
  --chart-3: oklch(0.398 0.018 10.001);
  --chart-4: oklch(0.426 0.02 10.018);
  --chart-5: oklch(0.426 0.022 187.623);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.014 188.272);
  --foreground: oklch(0.986 0.002 188.86);
  --muted: oklch(0.213 0.031 12.464);
  --muted-foreground: oklch(0.72 0.006 9.115);
  --popover: oklch(0.125 0.014 188.272);
  --popover-foreground: oklch(0.986 0.002 188.86);
  --card: oklch(0.125 0.014 188.272);
  --card-foreground: oklch(0.986 0.002 188.86);
  --border: oklch(0.272 0.003 188.615);
  --input: oklch(0.272 0.003 188.615);
  --primary: oklch(0.421 0.017 187.929);
  --primary-foreground: oklch(0.919 0.005 188.768);
  --secondary: oklch(0.398 0.018 10.001);
  --secondary-foreground: oklch(0.912 0.006 9.054);
  --accent: oklch(0.398 0.018 10.001);
  --accent-foreground: oklch(0.912 0.006 9.054);
  --destructive: oklch(0.643 0.22 35.714);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.421 0.017 187.929);
  --chart-1: oklch(0.421 0.017 187.929);
  --chart-2: oklch(0.398 0.018 10.001);
  --chart-3: oklch(0.398 0.018 10.001);
  --chart-4: oklch(0.426 0.02 10.018);
  --chart-5: oklch(0.426 0.022 187.623);
}