Partial for shadcn/ui

Partial is a shadcn/ui theme built around a deep purple primary color (#280a29) with muted light purple accents (#d6bcd7). The light mode uses a neutral background (#fdfcfd). Dark mode keeps the deep purple primary (#280a29) on a purple-tinted background (#0b040c).

Color palette

TokenLightDark
Background
#fdfcfdwhite
#0b040cblack
Foreground
#140415black
#ffffffwhite
Card
#fcf8fcsnow
#0f0510black
Card foreground
#100411black
#ffffffwhite
Popover
#fdfcfdwhite
#0b040cblack
Popover foreground
#140415black
#ffffffwhite
Primary
#280a29black
#280a29black
Primary foreground
#dd85e0violet
#dd85e0violet
Secondary
#e5dce5gainsboro
#141414black
Secondary foreground
#513d52darkslategray
#adadaddarkgray
Muted
#eddeedlavender
#211212black
Muted foreground
#625062dimgray
#af9d9ddarkgray
Accent
#d6bcd7thistle
#252222black
Accent foreground
#3c243ddarkslategray
#c0b9b9silver
Destructive
#800600maroon
#ff3429orangered
Destructive foreground
#ffb6b3lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#280a29black
#280a29black

Contrast

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

Light mode
Text on background19.35:1AAA
Text on card19.06:1AAA
Primary button7.29:1AAA
Secondary button7.32:1AAA
Muted text5.71:1AA
Accent7.96:1AAA
Destructive6.49:1AA
Dark mode
Text on background20.27:1AAA
Text on card20.01:1AAA
Primary button7.29:1AAA
Secondary button8.18:1AAA
Muted text7.01:1AAA
Accent8.17:1AAA
Destructive3.64:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.003 324.637);
  --foreground: oklch(0.151 0.045 326.314);
  --muted: oklch(0.916 0.026 324.797);
  --muted-foreground: oklch(0.456 0.036 325.103);
  --popover: oklch(0.992 0.003 324.637);
  --popover-foreground: oklch(0.151 0.045 326.314);
  --card: oklch(0.983 0.006 324.656);
  --card-foreground: oklch(0.137 0.039 326.336);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.211 0.069 326.339);
  --primary-foreground: oklch(0.741 0.159 325.843);
  --secondary: oklch(0.904 0.016 324.728);
  --secondary-foreground: oklch(0.39 0.045 325.31);
  --accent: oklch(0.826 0.047 324.969);
  --accent-foreground: oklch(0.301 0.053 325.647);
  --destructive: oklch(0.379 0.151 30.144);
  --destructive-foreground: oklch(0.844 0.085 22.41);
  --ring: oklch(0.211 0.069 326.339);
  --chart-1: oklch(0.211 0.069 326.339);
  --chart-2: oklch(0.904 0.016 324.728);
  --chart-3: oklch(0.826 0.047 324.969);
  --chart-4: oklch(0.928 0.012 324.698);
  --chart-5: oklch(0.212 0.071 326.385);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.027 326.067);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.203 0.026 19.541);
  --muted-foreground: oklch(0.711 0.021 17.658);
  --popover: oklch(0.125 0.027 326.067);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.139 0.031 325.99);
  --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.211 0.069 326.339);
  --primary-foreground: oklch(0.741 0.159 325.843);
  --secondary: oklch(0.193 0 164.055);
  --secondary-foreground: oklch(0.749 0 158.199);
  --accent: oklch(0.256 0.005 17.512);
  --accent-foreground: oklch(0.792 0.008 17.315);
  --destructive: oklch(0.648 0.238 28.859);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.211 0.069 326.339);
  --chart-1: oklch(0.211 0.069 326.339);
  --chart-2: oklch(0.193 0 164.055);
  --chart-3: oklch(0.256 0.005 17.512);
  --chart-4: oklch(0.227 0 164.055);
  --chart-5: oklch(0.212 0.071 326.385);
}