Physical for shadcn/ui

Physical is a shadcn/ui theme built around a purple primary color (#ea75cb) with red accents (#ea7591). The light mode uses a neutral background (#fcf8fb). Dark mode keeps the purple primary (#ea75cb) on a purple-tinted background (#0c030a).

Color palette

TokenLightDark
Background
#fcf8fbsnow
#0c030ablack
Foreground
#12020eblack
#f8f7f8whitesmoke
Card
#fbf4f9lavenderblush
#10040dblack
Card foreground
#0e020ablack
#faf9fasnow
Popover
#fbf4f9lavenderblush
#10040dblack
Popover foreground
#0e020ablack
#faf9fasnow
Primary
#ea75cborchid
#ea75cborchid
Primary foreground
#28061fblack
#28061fblack
Secondary
#cf75eaorchid
#cf75eaorchid
Secondary foreground
#200628black
#200628black
Muted
#eee4f1lavender
#180e1bblack
Muted foreground
#544d56darkslategray
#b0a9b2darkgray
Accent
#ea7591palevioletred
#ea7591palevioletred
Accent foreground
#28060eblack
#28060eblack
Destructive
#5e1a08maroon
#ef643etomato
Destructive foreground
#f7b3a1lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#ea75cborchid
#ea75cborchid

Contrast

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

Light mode
Text on background19.13:1AAA
Text on card18.78:1AAA
Primary button6.99:1AA
Secondary button6.63:1AA
Muted text6.61:1AA
Accent6.66:1AA
Destructive7.29:1AAA
Dark mode
Text on background19.00:1AAA
Text on card19.10:1AAA
Primary button6.99:1AA
Secondary button6.63:1AA
Muted text8.20:1AAA
Accent6.66:1AA
Destructive6.57:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.007 334.647);
  --foreground: oklch(0.134 0.044 337.539);
  --muted: oklch(0.931 0.02 318.308);
  --muted-foreground: oklch(0.43 0.019 318.287);
  --popover: oklch(0.974 0.01 334.708);
  --popover-foreground: oklch(0.119 0.039 336.284);
  --card: oklch(0.974 0.01 334.708);
  --card-foreground: oklch(0.119 0.039 336.284);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.725 0.175 338.438);
  --primary-foreground: oklch(0.198 0.067 340.061);
  --secondary: oklch(0.707 0.186 317.88);
  --secondary-foreground: oklch(0.19 0.071 317.455);
  --accent: oklch(0.706 0.146 6.807);
  --accent-foreground: oklch(0.19 0.058 9.84);
  --destructive: oklch(0.328 0.103 35.611);
  --destructive-foreground: oklch(0.827 0.084 36.058);
  --ring: oklch(0.725 0.175 338.438);
  --chart-1: oklch(0.725 0.175 338.438);
  --chart-2: oklch(0.707 0.186 317.88);
  --chart-3: oklch(0.706 0.146 6.807);
  --chart-4: oklch(0.733 0.169 317.983);
  --chart-5: oklch(0.726 0.182 338.585);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.027 335.54);
  --foreground: oklch(0.976 0.002 334.567);
  --muted: oklch(0.183 0.03 318.131);
  --muted-foreground: oklch(0.742 0.016 318.308);
  --popover: oklch(0.137 0.03 336.784);
  --popover-foreground: oklch(0.984 0.001 334.553);
  --card: oklch(0.137 0.03 336.784);
  --card-foreground: oklch(0.984 0.001 334.553);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.725 0.175 338.438);
  --primary-foreground: oklch(0.198 0.067 340.061);
  --secondary: oklch(0.707 0.186 317.88);
  --secondary-foreground: oklch(0.19 0.071 317.455);
  --accent: oklch(0.706 0.146 6.807);
  --accent-foreground: oklch(0.19 0.058 9.84);
  --destructive: oklch(0.673 0.18 36.227);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.725 0.175 338.438);
  --chart-1: oklch(0.725 0.175 338.438);
  --chart-2: oklch(0.707 0.186 317.88);
  --chart-3: oklch(0.706 0.146 6.807);
  --chart-4: oklch(0.733 0.169 317.983);
  --chart-5: oklch(0.726 0.182 338.585);
}