Decadence for shadcn/ui

Decadence is a shadcn/ui theme built around a violet primary color (#7930b5) with green accents (#6cb530). The light mode uses a neutral background (#faf7fd). Dark mode keeps the violet primary (#7930b5) on a neutral background (#030203).

Color palette

TokenLightDark
Background
#faf7fdghostwhite
#030203black
Foreground
#000000black
#ffffffwhite
Card
#faf7fdghostwhite
#030203black
Card foreground
#000000black
#ffffffwhite
Popover
#faf7fdghostwhite
#030203black
Popover foreground
#000000black
#ffffffwhite
Primary
#7930b5rebeccapurple
#7930b5rebeccapurple
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#6cb530olivedrab
#6cb530olivedrab
Secondary foreground
#0c1405black
#0c1405black
Muted
#e7efe1beige
#161e10black
Muted foreground
#626f58dimgray
#9aa790darkseagreen
Accent
#6cb530olivedrab
#6cb530olivedrab
Accent foreground
#0c1405black
#0c1405black
Destructive
#7f320bsaddlebrown
#dd5613chocolate
Destructive foreground
#fad5c2peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7930b5rebeccapurple
#7930b5rebeccapurple

Contrast

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

Light mode
Text on background19.77:1AAA
Text on card19.77:1AAA
Primary button7.20:1AAA
Secondary button7.43:1AAA
Muted text4.54:1AA
Accent7.43:1AAA
Destructive6.53:1AA
Dark mode
Text on background20.75:1AAA
Text on card20.75:1AAA
Primary button7.20:1AAA
Secondary button7.43:1AAA
Muted text6.76:1AA
Accent7.43:1AAA
Destructive3.88:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.009 310.354);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.943 0.021 130.645);
  --muted-foreground: oklch(0.525 0.04 131.181);
  --popover: oklch(0.98 0.009 310.354);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.98 0.009 310.354);
  --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.482 0.199 305.021);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.7 0.179 134.256);
  --secondary-foreground: oklch(0.179 0.032 131.543);
  --accent: oklch(0.7 0.179 134.256);
  --accent-foreground: oklch(0.179 0.032 131.543);
  --destructive: oklch(0.419 0.117 42.637);
  --destructive-foreground: oklch(0.898 0.049 48.156);
  --ring: oklch(0.482 0.199 305.021);
  --chart-1: oklch(0.482 0.199 305.021);
  --chart-2: oklch(0.7 0.179 134.256);
  --chart-3: oklch(0.7 0.179 134.256);
  --chart-4: oklch(0.734 0.188 134.285);
  --chart-5: oklch(0.482 0.206 304.599);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.086 0.011 311.483);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.223 0.029 131.793);
  --muted-foreground: oklch(0.713 0.037 130.937);
  --popover: oklch(0.086 0.011 311.483);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.086 0.011 311.483);
  --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.482 0.199 305.021);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.7 0.179 134.256);
  --secondary-foreground: oklch(0.179 0.032 131.543);
  --accent: oklch(0.7 0.179 134.256);
  --accent-foreground: oklch(0.179 0.032 131.543);
  --destructive: oklch(0.623 0.182 41.635);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.482 0.199 305.021);
  --chart-1: oklch(0.482 0.199 305.021);
  --chart-2: oklch(0.7 0.179 134.256);
  --chart-3: oklch(0.7 0.179 134.256);
  --chart-4: oklch(0.734 0.188 134.285);
  --chart-5: oklch(0.482 0.206 304.599);
}