Pörpl for shadcn/ui

Pörpl is a shadcn/ui theme built around a vivid deep violet primary color (#2b0047) with neutral gray accents (#d9d7db). The light mode uses a neutral background (#fbf7fd). Dark mode keeps the vivid deep violet primary (#2b0047) on a neutral background (#030203).

Color palette

TokenLightDark
Background
#fbf7fdghostwhite
#030203black
Foreground
#08040cblack
#faf8fcghostwhite
Card
#fbf7fdghostwhite
#030203black
Card foreground
#08040cblack
#faf8fcghostwhite
Popover
#fbf7fdghostwhite
#030203black
Popover foreground
#08040cblack
#faf8fcghostwhite
Primary
#2b0047midnightblue
#2b0047midnightblue
Primary foreground
#f0d9fflavender
#ca7affviolet
Secondary
#d9d7dbgainsboro
#18131bblack
Secondary foreground
#403d43darkslategray
#b2a3bddarkgray
Muted
#e1dbe6gainsboro
#201924black
Muted foreground
#524e56darkslategray
#aea9b1darkgray
Accent
#d9d7dbgainsboro
#18131bblack
Accent foreground
#403d43darkslategray
#b2a3bddarkgray
Destructive
#a02208firebrick
#f15016orangered
Destructive foreground
#fde2ddmistyrose
#ffefd3papayawhip
Border
#edeceewhitesmoke
#1f1d20black
Input
#edeceewhitesmoke
#1f1d20black
Ring
#2b0047midnightblue
#2b0047midnightblue

Contrast

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

Light mode
Text on background19.14:1AAA
Text on card19.14:1AAA
Primary button13.46:1AAA
Secondary button7.46:1AAA
Muted text6.00:1AA
Accent7.46:1AAA
Destructive6.28:1AA
Dark mode
Text on background19.65:1AAA
Text on card19.65:1AAA
Primary button6.48:1AA
Secondary button7.71:1AAA
Muted text7.41:1AAA
Accent7.71:1AAA
Destructive3.13:1AA Large

CSS variables

Paste this into your globals.css to use Pörpl in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.009 312.289);
  --foreground: oklch(0.119 0.025 313.888);
  --muted: oklch(0.9 0.016 312.23);
  --muted-foreground: oklch(0.43 0.015 312.105);
  --popover: oklch(0.98 0.009 312.289);
  --popover-foreground: oklch(0.119 0.025 313.888);
  --card: oklch(0.98 0.009 312.289);
  --card-foreground: oklch(0.119 0.025 313.888);
  --border: oklch(0.945 0.003 312.333);
  --input: oklch(0.945 0.003 312.333);
  --primary: oklch(0.23 0.119 305.569);
  --primary-foreground: oklch(0.915 0.056 311.902);
  --secondary: oklch(0.882 0.006 312.31);
  --secondary-foreground: oklch(0.365 0.012 312.115);
  --accent: oklch(0.882 0.006 312.31);
  --accent-foreground: oklch(0.365 0.012 312.115);
  --destructive: oklch(0.461 0.165 32.545);
  --destructive-foreground: oklch(0.934 0.031 31.138);
  --ring: oklch(0.23 0.119 305.569);
  --chart-1: oklch(0.23 0.119 305.569);
  --chart-2: oklch(0.882 0.006 312.31);
  --chart-3: oklch(0.882 0.006 312.31);
  --chart-4: oklch(0.906 0.005 312.321);
  --chart-5: oklch(0.23 0.121 305.335);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.086 0.011 313.445);
  --foreground: oklch(0.982 0.005 312.321);
  --muted: oklch(0.227 0.022 311.646);
  --muted-foreground: oklch(0.742 0.013 312.23);
  --popover: oklch(0.086 0.011 313.445);
  --popover-foreground: oklch(0.982 0.005 312.321);
  --card: oklch(0.086 0.011 313.445);
  --card-foreground: oklch(0.982 0.005 312.321);
  --border: oklch(0.234 0.008 312.114);
  --input: oklch(0.234 0.008 312.114);
  --primary: oklch(0.23 0.119 305.569);
  --primary-foreground: oklch(0.719 0.198 310.026);
  --secondary: oklch(0.197 0.016 311.756);
  --secondary-foreground: oklch(0.737 0.04 311.96);
  --accent: oklch(0.197 0.016 311.756);
  --accent-foreground: oklch(0.737 0.04 311.96);
  --destructive: oklch(0.649 0.207 37.226);
  --destructive-foreground: oklch(0.958 0.04 82.213);
  --ring: oklch(0.23 0.119 305.569);
  --chart-1: oklch(0.23 0.119 305.569);
  --chart-2: oklch(0.197 0.016 311.756);
  --chart-3: oklch(0.197 0.016 311.756);
  --chart-4: oklch(0.228 0.021 311.69);
  --chart-5: oklch(0.23 0.121 305.335);
}