Disastrous Sugar Grape for shadcn/ui

Disastrous Sugar Grape is a shadcn/ui theme built around a vivid violet primary color (#9933ff) with muted light violet accents (#d1c9d9). The light mode uses a neutral background (#faf6fd). Dark mode keeps the vivid violet primary (#9933ff) on a violet-tinted background (#08050a).

Color palette

TokenLightDark
Background
#faf6fdghostwhite
#08050ablack
Foreground
#030104black
#faf9fbghostwhite
Card
#faf6fdghostwhite
#08050ablack
Card foreground
#030104black
#faf9fbghostwhite
Popover
#faf6fdghostwhite
#08050ablack
Popover foreground
#030104black
#faf9fbghostwhite
Primary
#9933ffblueviolet
#9933ffblueviolet
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#e3e0e5gainsboro
#1f1d20black
Secondary foreground
#4a4351darkslategray
#b8b5basilver
Muted
#e8e6ealavender
#171519black
Muted foreground
#4f4659darkslategray
#b0a6b9darkgray
Accent
#d1c9d9lightgrey
#302b36darkslategray
Accent foreground
#382e42darkslategray
#c9c3d0thistle
Destructive
#781002maroon
#e11e05red
Destructive foreground
#fdb8aflightpink
#ffffffwhite
Border
#e0dce5gainsboro
#1a161dblack
Input
#e0dce5gainsboro
#1a161dblack
Ring
#9933ffblueviolet
#9933ffblueviolet

Contrast

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

Light mode
Text on background19.52:1AAA
Text on card19.52:1AAA
Primary button4.91:1AA
Secondary button7.27:1AAA
Muted text7.19:1AAA
Accent7.97:1AAA
Destructive6.75:1AA
Dark mode
Text on background19.30:1AAA
Text on card19.30:1AAA
Primary button4.91:1AA
Secondary button8.23:1AAA
Muted text7.78:1AAA
Accent8.01:1AAA
Destructive4.78:1AA

CSS variables

Paste this into your globals.css to use Disastrous Sugar Grape in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.979 0.01 308.349);
  --foreground: oklch(0.079 0.021 310.367);
  --muted: oklch(0.928 0.006 308.389);
  --muted-foreground: oklch(0.409 0.033 307.555);
  --popover: oklch(0.979 0.01 308.349);
  --popover-foreground: oklch(0.079 0.021 310.367);
  --card: oklch(0.979 0.01 308.349);
  --card-foreground: oklch(0.079 0.021 310.367);
  --border: oklch(0.9 0.013 308.296);
  --input: oklch(0.9 0.013 308.296);
  --primary: oklch(0.582 0.273 300.228);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.911 0.007 308.371);
  --secondary-foreground: oklch(0.396 0.024 307.798);
  --accent: oklch(0.847 0.024 308.142);
  --accent-foreground: oklch(0.321 0.038 307.149);
  --destructive: oklch(0.369 0.139 31.368);
  --destructive-foreground: oklch(0.845 0.082 27.387);
  --ring: oklch(0.582 0.273 300.228);
  --chart-1: oklch(0.582 0.273 300.228);
  --chart-2: oklch(0.911 0.007 308.371);
  --chart-3: oklch(0.847 0.024 308.142);
  --chart-4: oklch(0.936 0.005 308.398);
  --chart-5: oklch(0.582 0.278 299.85);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.015 309.341);
  --foreground: oklch(0.984 0.002 308.436);
  --muted: oklch(0.199 0.009 307.976);
  --muted-foreground: oklch(0.741 0.029 308.029);
  --popover: oklch(0.123 0.015 309.341);
  --popover-foreground: oklch(0.984 0.002 308.436);
  --card: oklch(0.123 0.015 309.341);
  --card-foreground: oklch(0.984 0.002 308.436);
  --border: oklch(0.207 0.016 307.603);
  --input: oklch(0.207 0.016 307.603);
  --primary: oklch(0.582 0.273 300.228);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.235 0.005 308.226);
  --secondary-foreground: oklch(0.776 0.009 308.337);
  --accent: oklch(0.299 0.022 307.638);
  --accent-foreground: oklch(0.826 0.019 308.205);
  --destructive: oklch(0.58 0.226 30.673);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.582 0.273 300.228);
  --chart-1: oklch(0.582 0.273 300.228);
  --chart-2: oklch(0.235 0.005 308.226);
  --chart-3: oklch(0.299 0.022 307.638);
  --chart-4: oklch(0.266 0.006 308.21);
  --chart-5: oklch(0.582 0.278 299.85);
}