Sweet Dracula for shadcn/ui

Sweet Dracula is a shadcn/ui theme built around a light yellow primary color (#f8f8f2) with muted deep blue accents (#343b56). The light mode uses a blue-tinted background (#171a26). Dark mode keeps the light yellow primary (#f8f8f2) on a blue-tinted background (#171a26).

Color palette

TokenLightDark
Background
#171a26black
#171a26black
Foreground
#f8f8f2whitesmoke
#f8f8f2whitesmoke
Card
#131620black
#131620black
Card foreground
#ffffffwhite
#ffffffwhite
Popover
#11141dblack
#11141dblack
Popover foreground
#ffffffwhite
#ffffffwhite
Primary
#f8f8f2whitesmoke
#f8f8f2whitesmoke
Primary foreground
#35351ddarkslategray
#35351ddarkslategray
Secondary
#4d4d33darkolivegreen
#4d4d33darkolivegreen
Secondary foreground
#e0e0d1gainsboro
#e0e0d1gainsboro
Muted
#24262edarkslategray
#24262edarkslategray
Muted foreground
#9ea2b3darkgray
#9ea2b3darkgray
Accent
#343b56darkslategray
#343b56darkslategray
Accent foreground
#d6d9e6gainsboro
#d6d9e6gainsboro
Destructive
#ea4343tomato
#ea4343tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#252732darkslategray
#252732darkslategray
Input
#2b2e3bdarkslategray
#2b2e3bdarkslategray
Ring
#f8f8f2whitesmoke
#f8f8f2whitesmoke

Contrast

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

Light mode
Text on background16.24:1AAA
Text on card18.08:1AAA
Primary button11.72:1AAA
Secondary button6.54:1AA
Muted text5.95:1AA
Accent7.87:1AAA
Destructive3.90:1AA Large
Dark mode
Text on background16.24:1AAA
Text on card18.08:1AAA
Primary button11.72:1AAA
Secondary button6.54:1AA
Muted text5.95:1AA
Accent7.87:1AAA
Destructive3.90:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.221 0.024 273.395);
  --foreground: oklch(0.977 0.008 106.548);
  --muted: oklch(0.269 0.015 274.291);
  --muted-foreground: oklch(0.714 0.025 274.588);
  --popover: oklch(0.191 0.019 273.588);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.201 0.021 273.516);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.276 0.02 274.049);
  --input: oklch(0.305 0.022 274.004);
  --primary: oklch(0.977 0.008 106.548);
  --primary-foreground: oklch(0.322 0.04 108.432);
  --secondary: oklch(0.411 0.04 108.031);
  --secondary-foreground: oklch(0.904 0.02 106.802);
  --accent: oklch(0.357 0.049 272.939);
  --accent-foreground: oklch(0.886 0.018 274.771);
  --destructive: oklch(0.627 0.204 25.298);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.977 0.008 106.548);
  --chart-1: oklch(0.977 0.008 106.548);
  --chart-2: oklch(0.411 0.04 108.031);
  --chart-3: oklch(0.357 0.049 272.939);
  --chart-4: oklch(0.444 0.044 108.055);
  --chart-5: oklch(0.978 0.009 106.563);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.221 0.024 273.395);
  --foreground: oklch(0.977 0.008 106.548);
  --muted: oklch(0.269 0.015 274.291);
  --muted-foreground: oklch(0.714 0.025 274.588);
  --popover: oklch(0.191 0.019 273.588);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.201 0.021 273.516);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.276 0.02 274.049);
  --input: oklch(0.305 0.022 274.004);
  --primary: oklch(0.977 0.008 106.548);
  --primary-foreground: oklch(0.322 0.04 108.432);
  --secondary: oklch(0.411 0.04 108.031);
  --secondary-foreground: oklch(0.904 0.02 106.802);
  --accent: oklch(0.357 0.049 272.939);
  --accent-foreground: oklch(0.886 0.018 274.771);
  --destructive: oklch(0.627 0.204 25.298);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.977 0.008 106.548);
  --chart-1: oklch(0.977 0.008 106.548);
  --chart-2: oklch(0.411 0.04 108.031);
  --chart-3: oklch(0.357 0.049 272.939);
  --chart-4: oklch(0.444 0.044 108.055);
  --chart-5: oklch(0.978 0.009 106.563);
}