Dracula for shadcn/ui

Dracula is a shadcn/ui theme built around a light yellow primary color (#f8f8f2) with muted blue accents (#484b61). The light mode uses a blue-tinted background (#272935). Dark mode keeps the light yellow primary (#f8f8f2) on a blue-tinted background (#272935).

Color palette

TokenLightDark
Background
#272935darkslategray
#272935darkslategray
Foreground
#f8f8f2whitesmoke
#f8f8f2whitesmoke
Card
#23252fdarkslategray
#23252fdarkslategray
Card foreground
#ffffffwhite
#ffffffwhite
Popover
#21222cdarkslategray
#21222cdarkslategray
Popover foreground
#ffffffwhite
#ffffffwhite
Primary
#f8f8f2whitesmoke
#f8f8f2whitesmoke
Primary foreground
#35351ddarkslategray
#35351ddarkslategray
Secondary
#4d4d33darkolivegreen
#4d4d33darkolivegreen
Secondary foreground
#e0e0d1gainsboro
#e0e0d1gainsboro
Muted
#31333fdarkslategray
#31333fdarkslategray
Muted foreground
#afb2c0silver
#afb2c0silver
Accent
#484b61darkslategray
#484b61darkslategray
Accent foreground
#eaebf0lavender
#eaebf0lavender
Destructive
#e9452ftomato
#e9452ftomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#38393edarkslategray
#38393edarkslategray
Input
#3f4046darkslategray
#3f4046darkslategray
Ring
#f8f8f2whitesmoke
#f8f8f2whitesmoke

Contrast

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

Light mode
Text on background13.53:1AAA
Text on card15.32:1AAA
Primary button11.72:1AAA
Secondary button6.54:1AA
Muted text5.90:1AA
Accent7.17:1AAA
Destructive3.91:1AA Large
Dark mode
Text on background13.53:1AAA
Text on card15.32:1AAA
Primary button11.72:1AAA
Secondary button6.54:1AA
Muted text5.90:1AA
Accent7.17:1AAA
Destructive3.91:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.284 0.022 277.093);
  --foreground: oklch(0.977 0.008 106.548);
  --muted: oklch(0.325 0.02 277.326);
  --muted-foreground: oklch(0.765 0.021 277.909);
  --popover: oklch(0.256 0.019 277.158);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.265 0.02 277.135);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.344 0.009 277.939);
  --input: oklch(0.373 0.01 277.93);
  --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.419 0.036 276.917);
  --accent-foreground: oklch(0.942 0.006 278.223);
  --destructive: oklch(0.626 0.204 30.865);
  --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.419 0.036 276.917);
  --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.284 0.022 277.093);
  --foreground: oklch(0.977 0.008 106.548);
  --muted: oklch(0.325 0.02 277.326);
  --muted-foreground: oklch(0.765 0.021 277.909);
  --popover: oklch(0.256 0.019 277.158);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.265 0.02 277.135);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.344 0.009 277.939);
  --input: oklch(0.373 0.01 277.93);
  --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.419 0.036 276.917);
  --accent-foreground: oklch(0.942 0.006 278.223);
  --destructive: oklch(0.626 0.204 30.865);
  --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.419 0.036 276.917);
  --chart-4: oklch(0.444 0.044 108.055);
  --chart-5: oklch(0.978 0.009 106.563);
}