Material Dark for shadcn/ui

Material Dark is a shadcn/ui theme built around a near-white primary color (#ffffff) with muted deep blue accents (#384952). The light mode uses a blue-tinted background (#192124). Dark mode keeps the near-white primary (#ffffff) on a blue-tinted background (#192124).

Color palette

TokenLightDark
Background
#192124black
#192124black
Foreground
#aabcc5silver
#aabcc5silver
Card
#151b1eblack
#151b1eblack
Card foreground
#b9c8cflightsteelblue
#b9c8cflightsteelblue
Popover
#13181bblack
#13181bblack
Popover foreground
#c8d4dalightgrey
#c8d4dalightgrey
Primary
#ffffffwhite
#ffffffwhite
Primary foreground
#333333darkslategray
#333333darkslategray
Secondary
#404040darkslategray
#404040darkslategray
Secondary foreground
#d9d9d9gainsboro
#d9d9d9gainsboro
Muted
#242a2edarkslategray
#242a2edarkslategray
Muted foreground
#9eacb3darkgray
#9eacb3darkgray
Accent
#384952darkslategray
#384952darkslategray
Accent foreground
#d8e0e4gainsboro
#d8e0e4gainsboro
Destructive
#ff3029orangered
#ff3029orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#272d2fdarkslategray
#272d2fdarkslategray
Input
#2e3538darkslategray
#2e3538darkslategray
Ring
#ffffffwhite
#ffffffwhite

Contrast

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

Light mode
Text on background8.37:1AAA
Text on card10.11:1AAA
Primary button12.63:1AAA
Secondary button7.37:1AAA
Muted text6.20:1AA
Accent6.98:1AA
Destructive3.68:1AA Large
Dark mode
Text on background8.37:1AAA
Text on card10.11:1AAA
Primary button12.63:1AAA
Secondary button7.37:1AAA
Muted text6.20:1AA
Accent6.98:1AA
Destructive3.68:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.24 0.013 229.641);
  --foreground: oklch(0.785 0.024 229.18);
  --muted: oklch(0.282 0.011 229.325);
  --muted-foreground: oklch(0.735 0.019 229.102);
  --popover: oklch(0.206 0.011 229.542);
  --popover-foreground: oklch(0.863 0.015 228.985);
  --card: oklch(0.218 0.012 229.579);
  --card-foreground: oklch(0.824 0.019 229.075);
  --border: oklch(0.292 0.009 229.175);
  --input: oklch(0.322 0.01 229.193);
  --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.395 0.027 229.873);
  --accent-foreground: oklch(0.901 0.011 228.909);
  --destructive: oklch(0.646 0.24 28.417);
  --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.395 0.027 229.873);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(1 0 180);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.24 0.013 229.641);
  --foreground: oklch(0.785 0.024 229.18);
  --muted: oklch(0.282 0.011 229.325);
  --muted-foreground: oklch(0.735 0.019 229.102);
  --popover: oklch(0.206 0.011 229.542);
  --popover-foreground: oklch(0.863 0.015 228.985);
  --card: oklch(0.218 0.012 229.579);
  --card-foreground: oklch(0.824 0.019 229.075);
  --border: oklch(0.292 0.009 229.175);
  --input: oklch(0.322 0.01 229.193);
  --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.395 0.027 229.873);
  --accent-foreground: oklch(0.901 0.011 228.909);
  --destructive: oklch(0.646 0.24 28.417);
  --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.395 0.027 229.873);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(1 0 180);
}