PyCharm Dark Theme for shadcn/ui

PyCharm Dark Theme is a shadcn/ui theme built around a near-white primary color (#f7f7f7) with neutral gray accents (#4a4f55). The light mode uses a neutral background (#26292c). Dark mode keeps the near-white primary (#f7f7f7) on a neutral background (#26292c).

Color palette

TokenLightDark
Background
#26292cdarkslategray
#26292cdarkslategray
Foreground
#a9b7c6silver
#a9b7c6silver
Card
#212426darkslategray
#212426darkslategray
Card foreground
#b9c4d0lightsteelblue
#b9c4d0lightsteelblue
Popover
#1f2123black
#1f2123black
Popover foreground
#c8d1dalightgrey
#c8d1dalightgrey
Primary
#f7f7f7whitesmoke
#f7f7f7whitesmoke
Primary foreground
#5e5e5edimgray
#5e5e5edimgray
Secondary
#404040darkslategray
#404040darkslategray
Secondary foreground
#d9d9d9gainsboro
#d9d9d9gainsboro
Muted
#2d3339darkslategray
#2d3339darkslategray
Muted foreground
#a9b3bcdarkgray
#a9b3bcdarkgray
Accent
#4a4f55darkslategray
#4a4f55darkslategray
Accent foreground
#e6e8ealavender
#e6e8ealavender
Destructive
#db1e14crimson
#db1e14crimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#363636darkslategray
#363636darkslategray
Input
#3d3d3ddarkslategray
#3d3d3ddarkslategray
Ring
#f7f7f7whitesmoke
#f7f7f7whitesmoke

Contrast

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

Light mode
Text on background7.17:1AAA
Text on card8.84:1AAA
Primary button6.07:1AA
Secondary button7.37:1AAA
Muted text5.99:1AA
Accent6.73:1AA
Destructive4.97:1AA
Dark mode
Text on background7.17:1AAA
Text on card8.84:1AAA
Primary button6.07:1AA
Secondary button7.37:1AAA
Muted text5.99:1AA
Accent6.73:1AA
Destructive4.97:1AA

CSS variables

Paste this into your globals.css to use PyCharm Dark Theme in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.278 0.007 248.068);
  --foreground: oklch(0.774 0.026 249.951);
  --muted: oklch(0.318 0.014 248.262);
  --muted-foreground: oklch(0.761 0.017 248.048);
  --popover: oklch(0.247 0.006 248.055);
  --popover-foreground: oklch(0.856 0.016 249.825);
  --card: oklch(0.258 0.006 248.06);
  --card-foreground: oklch(0.815 0.021 249.884);
  --border: oklch(0.331 0 180);
  --input: oklch(0.361 0 180);
  --primary: oklch(0.977 0 180);
  --primary-foreground: oklch(0.483 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.425 0.012 248.102);
  --accent-foreground: oklch(0.93 0.003 247.853);
  --destructive: oklch(0.57 0.22 29.317);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.977 0 180);
  --chart-1: oklch(0.977 0 180);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.425 0.012 248.102);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(0.977 0 17.167);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.278 0.007 248.068);
  --foreground: oklch(0.774 0.026 249.951);
  --muted: oklch(0.318 0.014 248.262);
  --muted-foreground: oklch(0.761 0.017 248.048);
  --popover: oklch(0.247 0.006 248.055);
  --popover-foreground: oklch(0.856 0.016 249.825);
  --card: oklch(0.258 0.006 248.06);
  --card-foreground: oklch(0.815 0.021 249.884);
  --border: oklch(0.331 0 180);
  --input: oklch(0.361 0 180);
  --primary: oklch(0.977 0 180);
  --primary-foreground: oklch(0.483 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.425 0.012 248.102);
  --accent-foreground: oklch(0.93 0.003 247.853);
  --destructive: oklch(0.57 0.22 29.317);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.977 0 180);
  --chart-1: oklch(0.977 0 180);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.425 0.012 248.102);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(0.977 0 17.167);
}