Primary for shadcn/ui

Primary is a shadcn/ui theme built around a muted purple primary color (#534650) with muted pink accents (#534649). The light mode uses a neutral background (#fcf8fb). Dark mode keeps the muted purple primary (#534650) on a neutral background (#030203).

Color palette

TokenLightDark
Background
#fcf8fbsnow
#030203black
Foreground
#10050dblack
#ffffffwhite
Card
#faf5f9whitesmoke
#070406black
Card foreground
#0c040ablack
#ffffffwhite
Popover
#faf5f9whitesmoke
#070406black
Popover foreground
#0c040ablack
#ffffffwhite
Primary
#534650darkslategray
#534650darkslategray
Primary foreground
#e8e3e7gainsboro
#e8e3e7gainsboro
Secondary
#504653darkslategray
#504653darkslategray
Secondary foreground
#e7e3e8gainsboro
#e7e3e8gainsboro
Muted
#e6d5ecgainsboro
#24132ablack
Muted foreground
#6a5d6fdimgray
#9d90a2darkgray
Accent
#534649darkslategray
#534649darkslategray
Accent foreground
#e8e3e4gainsboro
#e8e3e4gainsboro
Destructive
#6a170cmaroon
#e6351eorangered
Destructive foreground
#f6b9b1lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#534650darkslategray
#534650darkslategray

Contrast

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

Light mode
Text on background19.02:1AAA
Text on card18.76:1AAA
Primary button7.03:1AAA
Secondary button7.09:1AAA
Muted text4.42:1AA Large
Accent7.08:1AAA
Destructive7.20:1AAA
Dark mode
Text on background20.72:1AAA
Text on card20.45:1AAA
Primary button7.03:1AAA
Secondary button7.09:1AAA
Muted text5.77:1AA
Accent7.08:1AAA
Destructive4.28:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.005 333.319);
  --foreground: oklch(0.137 0.028 335.322);
  --muted: oklch(0.893 0.036 317.097);
  --muted-foreground: oklch(0.497 0.033 317.037);
  --popover: oklch(0.975 0.007 333.359);
  --popover-foreground: oklch(0.124 0.025 334.247);
  --card: oklch(0.975 0.007 333.359);
  --card-foreground: oklch(0.124 0.025 334.247);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.411 0.025 334.196);
  --primary-foreground: oklch(0.921 0.007 333.36);
  --secondary: oklch(0.408 0.026 317.044);
  --secondary-foreground: oklch(0.92 0.007 317.172);
  --accent: oklch(0.408 0.02 0.116);
  --accent-foreground: oklch(0.92 0.005 358.946);
  --destructive: oklch(0.346 0.118 30.99);
  --destructive-foreground: oklch(0.84 0.072 27.254);
  --ring: oklch(0.411 0.025 334.196);
  --chart-1: oklch(0.411 0.025 334.196);
  --chart-2: oklch(0.408 0.026 317.044);
  --chart-3: oklch(0.408 0.02 0.116);
  --chart-4: oklch(0.435 0.028 317.041);
  --chart-5: oklch(0.409 0.033 334.508);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.088 0.01 333.667);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.222 0.05 316.573);
  --muted-foreground: oklch(0.67 0.031 317.085);
  --popover: oklch(0.111 0.012 333.667);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.111 0.012 333.667);
  --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.411 0.025 334.196);
  --primary-foreground: oklch(0.921 0.007 333.36);
  --secondary: oklch(0.408 0.026 317.044);
  --secondary-foreground: oklch(0.92 0.007 317.172);
  --accent: oklch(0.408 0.02 0.116);
  --accent-foreground: oklch(0.92 0.005 358.946);
  --destructive: oklch(0.605 0.215 31.041);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.411 0.025 334.196);
  --chart-1: oklch(0.411 0.025 334.196);
  --chart-2: oklch(0.408 0.026 317.044);
  --chart-3: oklch(0.408 0.02 0.116);
  --chart-4: oklch(0.435 0.028 317.041);
  --chart-5: oklch(0.409 0.033 334.508);
}