Privilege for shadcn/ui

Privilege is a shadcn/ui theme built around a muted light red primary color (#eae1e3) with muted light blue accents (#e1e3ea). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted light red primary (#eae1e3) on a red-tinted background (#0b0406).

Color palette

TokenLightDark
Background
#ffffffwhite
#0b0406black
Foreground
#000000black
#fbf9f9snow
Card
#ffffffwhite
#0b0406black
Card foreground
#000000black
#fbf9f9snow
Popover
#ffffffwhite
#0b0406black
Popover foreground
#000000black
#fbf9f9snow
Primary
#eae1e3gainsboro
#eae1e3gainsboro
Primary foreground
#594046darkslategray
#594046darkslategray
Secondary
#e3eae1gainsboro
#e3eae1gainsboro
Secondary foreground
#465940darkolivegreen
#465940darkolivegreen
Muted
#d3e3celightgrey
#21311cdarkslategray
Muted foreground
#60695ddimgray
#99a296darkgray
Accent
#e1e3eagainsboro
#e1e3eagainsboro
Accent foreground
#404659darkslategray
#404659darkslategray
Destructive
#8a320asaddlebrown
#f1753btomato
Destructive foreground
#fbdacbbisque
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#eae1e3gainsboro
#eae1e3gainsboro

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.30:1AAA
Secondary button6.18:1AA
Muted text4.27:1AA Large
Accent7.34:1AAA
Destructive6.26:1AA
Dark mode
Text on background19.35:1AAA
Text on card19.35:1AAA
Primary button7.30:1AAA
Secondary button6.18:1AA
Muted text5.24:1AA
Accent7.34:1AAA
Destructive7.36:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.899 0.034 137.828);
  --muted-foreground: oklch(0.511 0.021 137.837);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.918 0.009 0.15);
  --primary-foreground: oklch(0.401 0.035 2.256);
  --secondary: oklch(0.929 0.013 137.786);
  --secondary-foreground: oklch(0.44 0.045 137.97);
  --accent: oklch(0.917 0.009 271.321);
  --accent-foreground: oklch(0.397 0.032 270.484);
  --destructive: oklch(0.44 0.129 40.841);
  --destructive-foreground: oklch(0.912 0.043 46.387);
  --ring: oklch(0.918 0.009 0.15);
  --chart-1: oklch(0.918 0.009 0.15);
  --chart-2: oklch(0.929 0.013 137.786);
  --chart-3: oklch(0.917 0.009 271.321);
  --chart-4: oklch(0.95 0.009 137.779);
  --chart-5: oklch(0.917 0.011 0.204);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.122 0.018 359.913);
  --foreground: oklch(0.983 0.003 359.941);
  --muted: oklch(0.292 0.043 138.111);
  --muted-foreground: oklch(0.7 0.02 137.812);
  --popover: oklch(0.122 0.018 359.913);
  --popover-foreground: oklch(0.983 0.003 359.941);
  --card: oklch(0.122 0.018 359.913);
  --card-foreground: oklch(0.983 0.003 359.941);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.918 0.009 0.15);
  --primary-foreground: oklch(0.401 0.035 2.256);
  --secondary: oklch(0.929 0.013 137.786);
  --secondary-foreground: oklch(0.44 0.045 137.97);
  --accent: oklch(0.917 0.009 271.321);
  --accent-foreground: oklch(0.397 0.032 270.484);
  --destructive: oklch(0.699 0.169 43.504);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.918 0.009 0.15);
  --chart-1: oklch(0.918 0.009 0.15);
  --chart-2: oklch(0.929 0.013 137.786);
  --chart-3: oklch(0.917 0.009 271.321);
  --chart-4: oklch(0.95 0.009 137.779);
  --chart-5: oklch(0.917 0.011 0.204);
}