Mortified for shadcn/ui

Mortified is a shadcn/ui theme built around a muted violet primary color (#9f96ab) with muted light violet accents (#c0b7cc). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the muted violet primary (#9f96ab) on a neutral background (#020104).

Color palette

TokenLightDark
Background
#fcfbfewhite
#020104black
Foreground
#0c0614black
#faf8fcghostwhite
Card
#fcfbfewhite
#020104black
Card foreground
#0c0614black
#faf8fcghostwhite
Popover
#fcfbfewhite
#020104black
Popover foreground
#0c0614black
#faf8fcghostwhite
Primary
#9f96abdarkgray
#9f96abdarkgray
Primary foreground
#080708black
#080708black
Secondary
#d8d5ddgainsboro
#29282adarkslategray
Secondary foreground
#3f3946darkslategray
#c2c1c3silver
Muted
#f2eff6whitesmoke
#0c0910black
Muted foreground
#5f556ddimgray
#9c92aadarkgray
Accent
#c0b7ccsilver
#37313fdarkslategray
Accent foreground
#282230darkslategray
#d0ccd7lightgrey
Destructive
#7f1e01maroon
#fe4c16orangered
Destructive foreground
#ffc5b3lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9f96abdarkgray
#9f96abdarkgray

Contrast

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

Light mode
Text on background19.40:1AAA
Text on card19.40:1AAA
Primary button7.12:1AAA
Secondary button7.67:1AAA
Muted text6.11:1AA
Accent8.02:1AAA
Destructive6.65:1AA
Dark mode
Text on background19.71:1AAA
Text on card19.71:1AAA
Primary button7.12:1AAA
Secondary button8.19:1AAA
Muted text6.68:1AA
Accent7.92:1AAA
Destructive3.36:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 304.999);
  --foreground: oklch(0.14 0.031 302.964);
  --muted: oklch(0.955 0.01 304.9);
  --muted-foreground: oklch(0.469 0.039 303.896);
  --popover: oklch(0.99 0.003 304.999);
  --popover-foreground: oklch(0.14 0.031 302.964);
  --card: oklch(0.99 0.003 304.999);
  --card-foreground: oklch(0.14 0.031 302.964);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.688 0.032 304.412);
  --primary-foreground: oklch(0.129 0.005 305.233);
  --secondary: oklch(0.878 0.011 304.873);
  --secondary-foreground: oklch(0.356 0.023 304.16);
  --accent: oklch(0.794 0.03 304.515);
  --accent-foreground: oklch(0.264 0.027 303.637);
  --destructive: oklch(0.394 0.136 35.465);
  --destructive-foreground: oklch(0.869 0.071 37.598);
  --ring: oklch(0.688 0.032 304.412);
  --chart-1: oklch(0.688 0.032 304.412);
  --chart-2: oklch(0.878 0.011 304.873);
  --chart-3: oklch(0.794 0.03 304.515);
  --chart-4: oklch(0.902 0.009 304.912);
  --chart-5: oklch(0.683 0.04 304.231);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.08 0.018 306.239);
  --foreground: oklch(0.982 0.005 304.975);
  --muted: oklch(0.148 0.016 303.619);
  --muted-foreground: oklch(0.678 0.035 304.322);
  --popover: oklch(0.08 0.018 306.239);
  --popover-foreground: oklch(0.982 0.005 304.975);
  --card: oklch(0.08 0.018 306.239);
  --card-foreground: oklch(0.982 0.005 304.975);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.688 0.032 304.412);
  --primary-foreground: oklch(0.129 0.005 305.233);
  --secondary: oklch(0.278 0.003 304.89);
  --secondary-foreground: oklch(0.811 0.004 304.984);
  --accent: oklch(0.326 0.025 303.999);
  --accent-foreground: oklch(0.851 0.016 304.787);
  --destructive: oklch(0.665 0.222 35.421);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.688 0.032 304.412);
  --chart-1: oklch(0.688 0.032 304.412);
  --chart-2: oklch(0.278 0.003 304.89);
  --chart-3: oklch(0.326 0.025 303.999);
  --chart-4: oklch(0.309 0.004 304.884);
  --chart-5: oklch(0.683 0.04 304.231);
}