Discord Theme (Dark) for shadcn/ui

Discord Theme (Dark) is a shadcn/ui theme built around a near-white primary color (#ffffff) with muted blue accents (#595e69). The light mode uses a blue-tinted background (#36393f). Dark mode keeps the near-white primary (#ffffff) on a blue-tinted background (#36393f).

Color palette

TokenLightDark
Background
#36393fdarkslategray
#36393fdarkslategray
Foreground
#ffffffwhite
#ffffffwhite
Card
#31343adarkslategray
#31343adarkslategray
Card foreground
#ffffffwhite
#ffffffwhite
Popover
#2f3237darkslategray
#2f3237darkslategray
Popover foreground
#ffffffwhite
#ffffffwhite
Primary
#ffffffwhite
#ffffffwhite
Primary foreground
#333333darkslategray
#333333darkslategray
Secondary
#404040darkslategray
#404040darkslategray
Secondary foreground
#d9d9d9gainsboro
#d9d9d9gainsboro
Muted
#3d424ddarkslategray
#3d424ddarkslategray
Muted foreground
#bdc2cbsilver
#bdc2cbsilver
Accent
#595e69dimgray
#595e69dimgray
Accent foreground
#f9fafaghostwhite
#f9fafaghostwhite
Destructive
#fb492dtomato
#fb492dtomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#474747darkslategray
#474747darkslategray
Input
#4f4f4fdarkslategray
#4f4f4fdarkslategray
Ring
#ffffffwhite
#ffffffwhite

Contrast

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

Light mode
Text on background11.56:1AAA
Text on card12.45:1AAA
Primary button12.63:1AAA
Secondary button7.37:1AAA
Muted text5.63:1AA
Accent6.19:1AA
Destructive3.46:1AA Large
Dark mode
Text on background11.56:1AAA
Text on card12.45:1AAA
Primary button12.63:1AAA
Secondary button7.37:1AAA
Muted text5.63:1AA
Accent6.19:1AA
Destructive3.46:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.344 0.012 264.41);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.379 0.02 264.297);
  --muted-foreground: oklch(0.813 0.014 264.489);
  --popover: oklch(0.315 0.01 264.415);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.325 0.011 264.413);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.399 0 180);
  --input: oklch(0.428 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.482 0.018 264.394);
  --accent-foreground: oklch(0.984 0.001 264.549);
  --destructive: oklch(0.658 0.219 31.65);
  --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.482 0.018 264.394);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(1 0 180);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.344 0.012 264.41);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.379 0.02 264.297);
  --muted-foreground: oklch(0.813 0.014 264.489);
  --popover: oklch(0.315 0.01 264.415);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.325 0.011 264.413);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.399 0 180);
  --input: oklch(0.428 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.482 0.018 264.394);
  --accent-foreground: oklch(0.984 0.001 264.549);
  --destructive: oklch(0.658 0.219 31.65);
  --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.482 0.018 264.394);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(1 0 180);
}