Allegation for shadcn/ui

Allegation is a shadcn/ui theme built around a pink primary color (#df86c0) with green accents (#86dfa5). The light mode uses a neutral background (#fbf8fa). Dark mode keeps the pink primary (#df86c0) on a neutral background (#030203).

Color palette

TokenLightDark
Background
#fbf8fasnow
#030203black
Foreground
#0f050cblack
#f8f6f8whitesmoke
Card
#faf5f8whitesmoke
#070306black
Card foreground
#0b0409black
#fbf9fasnow
Popover
#faf5f8whitesmoke
#070306black
Popover foreground
#0b0409black
#fbf9fasnow
Primary
#df86c0orchid
#df86c0orchid
Primary foreground
#280b1eblack
#280b1eblack
Secondary
#86dfa5lightgreen
#86dfa5lightgreen
Secondary foreground
#0b2815black
#0b2815black
Muted
#eef6f1whitesmoke
#09110bblack
Muted foreground
#536a5bdimgray
#95ac9ddarkseagreen
Accent
#86dfa5lightgreen
#86dfa5lightgreen
Accent foreground
#0b2815black
#0b2815black
Destructive
#762a04saddlebrown
#f87330tomato
Destructive foreground
#fccab0peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#df86c0orchid
#df86c0orchid

Contrast

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

Light mode
Text on background19.07:1AAA
Text on card18.80:1AAA
Primary button7.18:1AAA
Secondary button9.86:1AAA
Muted text5.34:1AA
Accent9.86:1AAA
Destructive6.74:1AA
Dark mode
Text on background19.27:1AAA
Text on card19.52:1AAA
Primary button7.18:1AAA
Secondary button9.86:1AAA
Muted text7.90:1AAA
Accent9.86:1AAA
Destructive7.45:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.004 338.073);
  --foreground: oklch(0.137 0.025 340.001);
  --muted: oklch(0.967 0.011 157.735);
  --muted-foreground: oklch(0.5 0.036 156.385);
  --popover: oklch(0.975 0.006 338.118);
  --popover-foreground: oklch(0.124 0.022 338.484);
  --card: oklch(0.975 0.006 338.118);
  --card-foreground: oklch(0.124 0.022 338.484);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.732 0.13 341.395);
  --primary-foreground: oklch(0.206 0.057 343.431);
  --secondary: oklch(0.832 0.119 154.458);
  --secondary-foreground: oklch(0.249 0.051 152.341);
  --accent: oklch(0.832 0.119 154.458);
  --accent-foreground: oklch(0.249 0.051 152.341);
  --destructive: oklch(0.393 0.115 41.808);
  --destructive-foreground: oklch(0.876 0.067 47.934);
  --ring: oklch(0.732 0.13 341.395);
  --chart-1: oklch(0.732 0.13 341.395);
  --chart-2: oklch(0.832 0.119 154.458);
  --chart-3: oklch(0.832 0.119 154.458);
  --chart-4: oklch(0.848 0.107 154.929);
  --chart-5: oklch(0.731 0.136 341.566);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.088 0.01 338.181);
  --foreground: oklch(0.976 0.003 338.043);
  --muted: oklch(0.167 0.017 155.761);
  --muted-foreground: oklch(0.723 0.033 156.994);
  --popover: oklch(0.111 0.013 338.181);
  --popover-foreground: oklch(0.984 0.002 338.023);
  --card: oklch(0.111 0.013 338.181);
  --card-foreground: oklch(0.984 0.002 338.023);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.732 0.13 341.395);
  --primary-foreground: oklch(0.206 0.057 343.431);
  --secondary: oklch(0.832 0.119 154.458);
  --secondary-foreground: oklch(0.249 0.051 152.341);
  --accent: oklch(0.832 0.119 154.458);
  --accent-foreground: oklch(0.249 0.051 152.341);
  --destructive: oklch(0.704 0.18 44.016);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.732 0.13 341.395);
  --chart-1: oklch(0.732 0.13 341.395);
  --chart-2: oklch(0.832 0.119 154.458);
  --chart-3: oklch(0.832 0.119 154.458);
  --chart-4: oklch(0.848 0.107 154.929);
  --chart-5: oklch(0.731 0.136 341.566);
}