Protest for shadcn/ui

Protest is a shadcn/ui theme built around a muted violet primary color (#756080) with muted teal accents (#608075). The light mode uses a neutral background (#fbf8fc). Dark mode keeps the muted violet primary (#756080) on a violet-tinted background (#0b060e).

Color palette

TokenLightDark
Background
#fbf8fcghostwhite
#0b060eblack
Foreground
#0c0312black
#faf8fcghostwhite
Card
#f8f4fbghostwhite
#0e0812black
Card foreground
#09020dblack
#fdfcfdwhite
Popover
#fbf8fcghostwhite
#0b060eblack
Popover foreground
#0c0312black
#faf8fcghostwhite
Primary
#756080dimgray
#756080dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#807560dimgray
#807560dimgray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f1ebdfbeige
#201a0eblack
Muted foreground
#5f5b53dimgray
#aca8a0darkgray
Accent
#608075dimgray
#608075dimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#af260dfirebrick
#f04f33tomato
Destructive foreground
#fef3f1seashell
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#756080dimgray
#756080dimgray

Contrast

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

Light mode
Text on background19.17:1AAA
Text on card18.85:1AAA
Primary button5.58:1AA
Secondary button4.53:1AA
Muted text5.68:1AA
Accent4.33:1AA Large
Destructive6.20:1AA
Dark mode
Text on background18.97:1AAA
Text on card19.32:1AAA
Primary button5.58:1AA
Secondary button4.53:1AA
Muted text7.31:1AAA
Accent4.33:1AA Large
Destructive3.57:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.006 314.184);
  --foreground: oklch(0.128 0.04 314.648);
  --muted: oklch(0.941 0.017 83.065);
  --muted-foreground: oklch(0.473 0.014 83.054);
  --popover: oklch(0.982 0.006 314.184);
  --popover-foreground: oklch(0.128 0.04 314.648);
  --card: oklch(0.973 0.01 314.165);
  --card-foreground: oklch(0.115 0.035 316.181);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.522 0.054 313.646);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.566 0.033 82.949);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.572 0.04 171.365);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.493 0.177 32.07);
  --destructive-foreground: oklch(0.972 0.012 29.514);
  --ring: oklch(0.522 0.054 313.646);
  --chart-1: oklch(0.522 0.054 313.646);
  --chart-2: oklch(0.566 0.033 82.949);
  --chart-3: oklch(0.572 0.04 171.365);
  --chart-4: oklch(0.594 0.035 82.947);
  --chart-5: oklch(0.518 0.066 313.512);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.137 0.02 314.286);
  --foreground: oklch(0.982 0.005 314.192);
  --muted: oklch(0.22 0.023 82.425);
  --muted-foreground: oklch(0.732 0.013 83.065);
  --popover: oklch(0.137 0.02 314.286);
  --popover-foreground: oklch(0.982 0.005 314.192);
  --card: oklch(0.148 0.023 313.556);
  --card-foreground: oklch(0.991 0.002 314.206);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.522 0.054 313.646);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.566 0.033 82.949);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.572 0.04 171.365);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.647 0.201 32.368);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.522 0.054 313.646);
  --chart-1: oklch(0.522 0.054 313.646);
  --chart-2: oklch(0.566 0.033 82.949);
  --chart-3: oklch(0.572 0.04 171.365);
  --chart-4: oklch(0.594 0.035 82.947);
  --chart-5: oklch(0.518 0.066 313.512);
}