Anatomy for shadcn/ui

Anatomy is a shadcn/ui theme built around a muted violet primary color (#7d5591) with muted purple accents (#915587). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the muted violet primary (#7d5591) on a neutral background (#030203).

Color palette

TokenLightDark
Background
#fdfbfewhite
#030203black
Foreground
#09030cblack
#fdfcfdwhite
Card
#fdfbfewhite
#030203black
Card foreground
#09030cblack
#fdfcfdwhite
Popover
#fdfbfewhite
#030203black
Popover foreground
#09030cblack
#fdfcfdwhite
Primary
#7d5591rebeccapurple
#7d5591rebeccapurple
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#5f5591darkslateblue
#5f5591darkslateblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dedce5gainsboro
#1c1a23black
Muted foreground
#595766dimgray
#9c99a8darkgray
Accent
#915587gray
#915587gray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#791e02maroon
#fb450eorangered
Destructive foreground
#fec1aflightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7d5591rebeccapurple
#7d5591rebeccapurple

Contrast

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

Light mode
Text on background19.78:1AAA
Text on card19.78:1AAA
Primary button5.88:1AA
Secondary button6.58:1AA
Muted text5.19:1AA
Accent5.46:1AA
Destructive6.76:1AA
Dark mode
Text on background20.27:1AAA
Text on card20.27:1AAA
Primary button5.88:1AA
Secondary button6.58:1AA
Muted text6.15:1AA
Accent5.46:1AA
Destructive3.51:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.005 314.802);
  --foreground: oklch(0.119 0.028 316.523);
  --muted: oklch(0.898 0.012 293.823);
  --muted-foreground: oklch(0.464 0.024 293.07);
  --popover: oklch(0.99 0.005 314.802);
  --popover-foreground: oklch(0.119 0.028 316.523);
  --card: oklch(0.99 0.005 314.802);
  --card-foreground: oklch(0.119 0.028 316.523);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.516 0.102 313.8);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.486 0.094 290.078);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.535 0.104 333.247);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.382 0.13 35.654);
  --destructive-foreground: oklch(0.861 0.075 37.602);
  --ring: oklch(0.516 0.102 313.8);
  --chart-1: oklch(0.516 0.102 313.8);
  --chart-2: oklch(0.486 0.094 290.078);
  --chart-3: oklch(0.535 0.104 333.247);
  --chart-4: oklch(0.508 0.099 290.043);
  --chart-5: oklch(0.513 0.113 313.653);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.086 0.012 316.042);
  --foreground: oklch(0.992 0.001 314.82);
  --muted: oklch(0.225 0.017 292.653);
  --muted-foreground: oklch(0.69 0.022 293.466);
  --popover: oklch(0.086 0.012 316.042);
  --popover-foreground: oklch(0.992 0.001 314.82);
  --card: oklch(0.086 0.012 316.042);
  --card-foreground: oklch(0.992 0.001 314.82);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.516 0.102 313.8);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.486 0.094 290.078);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.535 0.104 333.247);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.655 0.225 34.871);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.516 0.102 313.8);
  --chart-1: oklch(0.516 0.102 313.8);
  --chart-2: oklch(0.486 0.094 290.078);
  --chart-3: oklch(0.535 0.104 333.247);
  --chart-4: oklch(0.508 0.099 290.043);
  --chart-5: oklch(0.513 0.113 313.653);
}