Posterior for shadcn/ui

Posterior is a shadcn/ui theme built around a muted deep purple primary color (#130b13) with muted deep pink accents (#130b0f). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep purple primary (#130b13) on a purple-tinted background (#0b040b).

Color palette

TokenLightDark
Background
#ffffffwhite
#0b040bblack
Foreground
#0c030cblack
#fdfcfdwhite
Card
#fcfcfcsnow
#0f050eblack
Card foreground
#080208black
#ffffffwhite
Popover
#fcfcfcsnow
#0f050eblack
Popover foreground
#080208black
#ffffffwhite
Primary
#130b13black
#130b13black
Primary foreground
#bf92bbdarkgray
#bf92bbdarkgray
Secondary
#100b13black
#100b13black
Secondary foreground
#ac92bfdarkgray
#ac92bfdarkgray
Muted
#dcd8degainsboro
#242127darkslategray
Muted foreground
#5d5464dimgray
#a59babdarkgray
Accent
#130b0fblack
#130b0fblack
Accent foreground
#bf92a5rosybrown
#bf92a5rosybrown
Destructive
#c0210cfirebrick
#f0290forangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#130b13black
#130b13black

Contrast

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

Light mode
Text on background20.31:1AAA
Text on card20.09:1AAA
Primary button7.40:1AAA
Secondary button7.04:1AAA
Muted text5.12:1AA
Accent7.25:1AAA
Destructive6.06:1AA
Dark mode
Text on background19.78:1AAA
Text on card19.99:1AAA
Primary button7.40:1AAA
Secondary button7.04:1AAA
Muted text5.96:1AA
Accent7.25:1AAA
Destructive4.17:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.123 0.031 329.729);
  --muted: oklch(0.888 0.009 311.647);
  --muted-foreground: oklch(0.46 0.029 311.218);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.108 0.027 329.498);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.108 0.027 329.498);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.165 0.02 329.243);
  --primary-foreground: oklch(0.715 0.078 329.143);
  --secondary: oklch(0.161 0.018 310.819);
  --secondary-foreground: oklch(0.698 0.071 310.905);
  --accent: oklch(0.163 0.015 352.136);
  --accent-foreground: oklch(0.707 0.06 351.915);
  --destructive: oklch(0.52 0.195 30.932);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.165 0.02 329.243);
  --chart-1: oklch(0.165 0.02 329.243);
  --chart-2: oklch(0.161 0.018 310.819);
  --chart-3: oklch(0.163 0.015 352.136);
  --chart-4: oklch(0.192 0.026 310.631);
  --chart-5: oklch(0.165 0.022 329.371);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.023 329.285);
  --foreground: oklch(0.992 0.002 328.088);
  --muted: oklch(0.253 0.012 311.355);
  --muted-foreground: oklch(0.703 0.026 311.426);
  --popover: oklch(0.139 0.027 329.655);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.139 0.027 329.655);
  --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.165 0.02 329.243);
  --primary-foreground: oklch(0.715 0.078 329.143);
  --secondary: oklch(0.161 0.018 310.819);
  --secondary-foreground: oklch(0.698 0.071 310.905);
  --accent: oklch(0.163 0.015 352.136);
  --accent-foreground: oklch(0.707 0.06 351.915);
  --destructive: oklch(0.614 0.232 30.873);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.165 0.02 329.243);
  --chart-1: oklch(0.165 0.02 329.243);
  --chart-2: oklch(0.161 0.018 310.819);
  --chart-3: oklch(0.163 0.015 352.136);
  --chart-4: oklch(0.192 0.026 310.631);
  --chart-5: oklch(0.165 0.022 329.371);
}