Darker discord for shadcn/ui

Darker discord is a shadcn/ui theme built around an indigo primary color (#2e317e) with muted light pink accents (#dac8d0). The light mode uses a neutral background (#ffffff). Dark mode keeps the indigo primary (#2e2e7e) on a blue-tinted background (#282b30).

Color palette

TokenLightDark
Background
#ffffffwhite
#282b30darkslategray
Foreground
#040102black
#fcf8fasnow
Card
#ffffffwhite
#202121black
Card foreground
#040102black
#fcf8fasnow
Popover
#ffffffwhite
#1e2124black
Popover foreground
#040102black
#fcf8fasnow
Primary
#2e317edarkslateblue
#2e2e7edarkslateblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#f9a12cgoldenrod
#424549darkslategray
Secondary foreground
#232222black
#ffffffwhite
Muted
#f7eef2whitesmoke
#1e2124black
Muted foreground
#67565ddimgray
#9b9b9bdarkgray
Accent
#dac8d0thistle
#282b30darkslategray
Accent foreground
#432d37darkslategray
#7289dacornflowerblue
Destructive
#712504maroon
#e61010red
Destructive foreground
#fcc4abpeachpuff
#000000black
Border
#f3f2f2whitesmoke
#2f2f2fdarkslategray
Input
#f3f2f2whitesmoke
#424549darkslategray
Ring
#ba4f7dindianred
#282b30darkslategray

Contrast

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

Light mode
Text on background20.78:1AAA
Text on card20.78:1AAA
Primary button11.30:1AAA
Secondary button7.67:1AAA
Muted text6.01:1AA
Accent7.88:1AAA
Destructive6.91:1AA
Dark mode
Text on background13.49:1AAA
Text on card15.39:1AAA
Primary button11.61:1AAA
Secondary button9.63:1AAA
Muted text5.82:1AA
Accent4.26:1AA Large
Destructive4.43:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.084 0.015 348.404);
  --muted: oklch(0.957 0.011 349.046);
  --muted-foreground: oklch(0.472 0.025 350.144);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.084 0.015 348.404);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.084 0.015 348.404);
  --border: oklch(0.961 0.002 348.778);
  --input: oklch(0.961 0.002 348.778);
  --primary: oklch(0.36 0.128 276.182);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.78 0.159 67.69);
  --secondary-foreground: oklch(0.253 0.003 349.02);
  --accent: oklch(0.85 0.023 349.473);
  --accent-foreground: oklch(0.327 0.036 351.632);
  --destructive: oklch(0.377 0.115 39.708);
  --destructive-foreground: oklch(0.863 0.073 44.314);
  --ring: oklch(0.579 0.147 355.605);
  --chart-1: oklch(0.36 0.128 276.182);
  --chart-2: oklch(0.78 0.159 67.69);
  --chart-3: oklch(0.85 0.023 349.473);
  --chart-4: oklch(0.793 0.152 69.295);
  --chart-5: oklch(0.355 0.135 275.386);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.288 0.01 260.707);
  --foreground: oklch(0.983 0.004 348.851);
  --muted: oklch(0.246 0.007 248.122);
  --muted-foreground: oklch(0.689 0 164.055);
  --popover: oklch(0.246 0.007 248.122);
  --popover-foreground: oklch(0.983 0.004 348.851);
  --card: oklch(0.245 0.002 247.904);
  --card-foreground: oklch(0.983 0.004 348.851);
  --border: oklch(0.305 0 171.87);
  --input: oklch(0.389 0.008 255.543);
  --primary: oklch(0.354 0.132 277.277);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.389 0.008 255.543);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.288 0.01 260.707);
  --accent-foreground: oklch(0.647 0.124 270.623);
  --destructive: oklch(0.584 0.234 28.709);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.288 0.01 260.707);
  --chart-1: oklch(0.354 0.132 277.277);
  --chart-2: oklch(0.389 0.008 255.543);
  --chart-3: oklch(0.288 0.01 260.707);
  --chart-4: oklch(0.417 0.009 255.544);
  --chart-5: oklch(0.349 0.14 276.395);
}