Purple for shadcn/ui

Purple is a shadcn/ui theme built around a muted teal primary color (#98b3a9) with muted orange accents (#b3a998). The light mode uses a neutral background (#fcfdfd). Dark mode keeps the muted teal primary (#98b3a9) on a neutral background (#010403).

Color palette

TokenLightDark
Background
#fcfdfdwhite
#010403black
Foreground
#04150fblack
#ffffffwhite
Card
#fcfdfdwhite
#010403black
Card foreground
#04150fblack
#ffffffwhite
Popover
#fcfdfdwhite
#010403black
Popover foreground
#04150fblack
#ffffffwhite
Primary
#98b3a9darkgray
#98b3a9darkgray
Primary foreground
#0b0f0dblack
#0b0f0dblack
Secondary
#a998b3darkgray
#a998b3darkgray
Secondary foreground
#0d0b0fblack
#0d0b0fblack
Muted
#e1d1eagainsboro
#24152eblack
Muted foreground
#695874dimgray
#9c8ba7darkgray
Accent
#b3a998darkgray
#b3a998darkgray
Accent foreground
#0f0d0bblack
#0f0d0bblack
Destructive
#6d1408maroon
#d52710firebrick
Destructive foreground
#f9b7aelightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#98b3a9darkgray
#98b3a9darkgray

Contrast

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

Light mode
Text on background18.42:1AAA
Text on card18.42:1AAA
Primary button8.61:1AAA
Secondary button7.32:1AAA
Muted text4.47:1AA Large
Accent8.35:1AAA
Destructive7.07:1AAA
Dark mode
Text on background20.58:1AAA
Text on card20.58:1AAA
Primary button8.61:1AAA
Secondary button7.32:1AAA
Muted text5.46:1AA
Accent8.35:1AAA
Destructive5.07:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.002 171.536);
  --foreground: oklch(0.179 0.028 167.205);
  --muted: oklch(0.882 0.038 312.693);
  --muted-foreground: oklch(0.487 0.05 312.292);
  --popover: oklch(0.993 0.002 171.536);
  --popover-foreground: oklch(0.179 0.028 167.205);
  --card: oklch(0.993 0.002 171.536);
  --card-foreground: oklch(0.179 0.028 167.205);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.744 0.033 170.254);
  --primary-foreground: oklch(0.162 0.007 170.309);
  --secondary: oklch(0.704 0.043 312.575);
  --secondary-foreground: oklch(0.154 0.009 312.592);
  --accent: oklch(0.738 0.026 79.822);
  --accent-foreground: oklch(0.161 0.005 79.829);
  --destructive: oklch(0.35 0.125 31.072);
  --destructive-foreground: oklch(0.838 0.078 27.339);
  --ring: oklch(0.744 0.033 170.254);
  --chart-1: oklch(0.744 0.033 170.254);
  --chart-2: oklch(0.704 0.043 312.575);
  --chart-3: oklch(0.738 0.026 79.822);
  --chart-4: oklch(0.73 0.039 312.627);
  --chart-5: oklch(0.748 0.039 169.988);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.099 0.012 171.861);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.228 0.051 311.323);
  --muted-foreground: oklch(0.661 0.046 312.512);
  --popover: oklch(0.099 0.012 171.861);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.099 0.012 171.861);
  --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.744 0.033 170.254);
  --primary-foreground: oklch(0.162 0.007 170.309);
  --secondary: oklch(0.704 0.043 312.575);
  --secondary-foreground: oklch(0.154 0.009 312.592);
  --accent: oklch(0.738 0.026 79.822);
  --accent-foreground: oklch(0.161 0.005 79.829);
  --destructive: oklch(0.564 0.211 30.951);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.744 0.033 170.254);
  --chart-1: oklch(0.744 0.033 170.254);
  --chart-2: oklch(0.704 0.043 312.575);
  --chart-3: oklch(0.738 0.026 79.822);
  --chart-4: oklch(0.73 0.039 312.627);
  --chart-5: oklch(0.748 0.039 169.988);
}