Partial for shadcn/ui

Partial is a shadcn/ui theme built around a purple primary color (#d369d2) with muted light purple accents (#e8e3e8). The light mode uses a neutral background (#fcf8fc). Dark mode keeps the purple primary (#d369d2) on a neutral background (#040104).

Color palette

TokenLightDark
Background
#fcf8fcsnow
#040104black
Foreground
#000000black
#faf9fasnow
Card
#faf5faghostwhite
#070307black
Card foreground
#000000black
#fdfcfdwhite
Popover
#fcf8fcsnow
#040104black
Popover foreground
#000000black
#faf9fasnow
Primary
#d369d2orchid
#d369d2orchid
Primary foreground
#080208black
#080208black
Secondary
#e8e3e8gainsboro
#262226darkslategray
Secondary foreground
#544554darkslategray
#c1b9c1silver
Muted
#f4e6f4lavenderblush
#190b18black
Muted foreground
#605c60dimgray
#a39fa2darkgray
Accent
#e8e3e8gainsboro
#262226darkslategray
Accent foreground
#544554darkslategray
#c1b9c1silver
Destructive
#962208darkred
#f2370dorangered
Destructive foreground
#fddbd3antiquewhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d369d2orchid
#d369d2orchid

Contrast

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

Light mode
Text on background19.96:1AAA
Text on card19.46:1AAA
Primary button6.57:1AA
Secondary button7.03:1AAA
Muted text5.47:1AA
Accent7.03:1AAA
Destructive6.41:1AA
Dark mode
Text on background19.74:1AAA
Text on card20.01:1AAA
Primary button6.57:1AA
Secondary button8.23:1AAA
Muted text7.29:1AAA
Accent8.23:1AAA
Destructive3.93: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.983 0.006 326.104);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.941 0.023 326.249);
  --muted-foreground: oklch(0.481 0.008 326.18);
  --popover: oklch(0.983 0.006 326.104);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.975 0.009 326.13);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.682 0.185 327.989);
  --primary-foreground: oklch(0.109 0.025 327.542);
  --secondary: oklch(0.921 0.009 326.129);
  --secondary-foreground: oklch(0.411 0.032 326.654);
  --accent: oklch(0.921 0.009 326.129);
  --accent-foreground: oklch(0.411 0.032 326.654);
  --destructive: oklch(0.443 0.156 33.239);
  --destructive-foreground: oklch(0.917 0.039 32.732);
  --ring: oklch(0.682 0.185 327.989);
  --chart-1: oklch(0.682 0.185 327.989);
  --chart-2: oklch(0.921 0.009 326.129);
  --chart-3: oklch(0.921 0.009 326.129);
  --chart-4: oklch(0.945 0.006 326.105);
  --chart-5: oklch(0.683 0.193 328.068);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.088 0.015 327.219);
  --foreground: oklch(0.984 0.002 326.069);
  --muted: oklch(0.176 0.034 327.477);
  --muted-foreground: oklch(0.706 0.007 326.132);
  --popover: oklch(0.088 0.015 327.219);
  --popover-foreground: oklch(0.984 0.002 326.069);
  --card: oklch(0.11 0.019 327.219);
  --card-foreground: oklch(0.992 0.001 326.061);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.682 0.185 327.989);
  --primary-foreground: oklch(0.109 0.025 327.542);
  --secondary: oklch(0.257 0.01 326.363);
  --secondary-foreground: oklch(0.794 0.014 326.195);
  --accent: oklch(0.257 0.01 326.363);
  --accent-foreground: oklch(0.794 0.014 326.195);
  --destructive: oklch(0.627 0.227 32.824);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.682 0.185 327.989);
  --chart-1: oklch(0.682 0.185 327.989);
  --chart-2: oklch(0.257 0.01 326.363);
  --chart-3: oklch(0.257 0.01 326.363);
  --chart-4: oklch(0.288 0.012 326.379);
  --chart-5: oklch(0.683 0.193 328.068);
}