Darcula Theme from IntelliJ for shadcn/ui

Darcula Theme from IntelliJ is a shadcn/ui theme built around a near-white primary color (#ffffff) with neutral gray accents (#474748). The light mode uses a neutral background (#212121). Dark mode keeps the near-white primary (#ffffff) on a neutral background (#212121).

Color palette

TokenLightDark
Background
#212121black
#212121black
Foreground
#d4d4d4lightgrey
#d4d4d4lightgrey
Card
#1c1c1cblack
#1c1c1cblack
Card foreground
#e0e0e0gainsboro
#e0e0e0gainsboro
Popover
#19191ablack
#19191ablack
Popover foreground
#edededwhitesmoke
#edededwhitesmoke
Primary
#ffffffwhite
#ffffffwhite
Primary foreground
#333333darkslategray
#333333darkslategray
Secondary
#404040darkslategray
#404040darkslategray
Secondary foreground
#d9d9d9gainsboro
#d9d9d9gainsboro
Muted
#262631darkslategray
#262631darkslategray
Muted foreground
#a1a1b5darkgray
#a1a1b5darkgray
Accent
#474748darkslategray
#474748darkslategray
Accent foreground
#e0e0e1gainsboro
#e0e0e1gainsboro
Destructive
#eb3e24orangered
#eb3e24orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#2e2e2edarkslategray
#2e2e2edarkslategray
Input
#363636darkslategray
#363636darkslategray
Ring
#ffffffwhite
#ffffffwhite

Contrast

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

Light mode
Text on background10.88:1AAA
Text on card12.93:1AAA
Primary button12.63:1AAA
Secondary button7.37:1AAA
Muted text5.89:1AA
Accent7.06:1AAA
Destructive4.00:1AA Large
Dark mode
Text on background10.88:1AAA
Text on card12.93:1AAA
Primary button12.63:1AAA
Secondary button7.37:1AAA
Muted text5.89:1AA
Accent7.06:1AAA
Destructive4.00:1AA Large

CSS variables

Paste this into your globals.css to use Darcula Theme from IntelliJ in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.247 0.001 286.309);
  --foreground: oklch(0.869 0 165.964);
  --muted: oklch(0.274 0.019 285.067);
  --muted-foreground: oklch(0.715 0.029 285.64);
  --popover: oklch(0.215 0.001 286.316);
  --popover-foreground: oklch(0.947 0 180);
  --card: oklch(0.226 0.001 286.313);
  --card-foreground: oklch(0.908 0 180);
  --border: oklch(0.301 0 189.462);
  --input: oklch(0.331 0 180);
  --primary: oklch(1 0 180);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.397 0.002 286.291);
  --accent-foreground: oklch(0.907 0.001 286.383);
  --destructive: oklch(0.621 0.213 31.66);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(1 0 180);
  --chart-1: oklch(1 0 180);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.397 0.002 286.291);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(1 0 180);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.247 0.001 286.309);
  --foreground: oklch(0.869 0 165.964);
  --muted: oklch(0.274 0.019 285.067);
  --muted-foreground: oklch(0.715 0.029 285.64);
  --popover: oklch(0.215 0.001 286.316);
  --popover-foreground: oklch(0.947 0 180);
  --card: oklch(0.226 0.001 286.313);
  --card-foreground: oklch(0.908 0 180);
  --border: oklch(0.301 0 189.462);
  --input: oklch(0.331 0 180);
  --primary: oklch(1 0 180);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.397 0.002 286.291);
  --accent-foreground: oklch(0.907 0.001 286.383);
  --destructive: oklch(0.621 0.213 31.66);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(1 0 180);
  --chart-1: oklch(1 0 180);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.397 0.002 286.291);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(1 0 180);
}