Min Dark for shadcn/ui

Min Dark is a shadcn/ui theme built around a neutral gray primary color (#7d7d7d) with neutral gray accents (#454545). The light mode uses a neutral background (#1f1f1f). Dark mode keeps the neutral gray primary (#7d7d7d) on a neutral background (#1f1f1f).

Color palette

TokenLightDark
Background
#1f1f1fblack
#1f1f1fblack
Foreground
#bababasilver
#bababasilver
Card
#1a1a1ablack
#1a1a1ablack
Card foreground
#c7c7c7silver
#c7c7c7silver
Popover
#171717black
#171717black
Popover foreground
#d4d4d4lightgrey
#d4d4d4lightgrey
Primary
#7d7d7dgray
#7d7d7dgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#bfbfbfsilver
#bfbfbfsilver
Secondary foreground
#262626darkslategray
#262626darkslategray
Muted
#2e2424darkslategray
#2e2424darkslategray
Muted foreground
#b39e9edarkgray
#b39e9edarkgray
Accent
#454545darkslategray
#454545darkslategray
Accent foreground
#dededegainsboro
#dededegainsboro
Destructive
#ff2014red
#ff2014red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#2b2b2bdarkslategray
#2b2b2bdarkslategray
Input
#333333darkslategray
#333333darkslategray
Ring
#7d7d7dgray
#7d7d7dgray

Contrast

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

Light mode
Text on background8.53:1AAA
Text on card10.34:1AAA
Primary button4.11:1AA Large
Secondary button8.25:1AAA
Muted text5.96:1AA
Accent7.14:1AAA
Destructive3.83:1AA Large
Dark mode
Text on background8.53:1AAA
Text on card10.34:1AAA
Primary button4.11:1AA Large
Secondary button8.25:1AAA
Muted text5.96:1AA
Accent7.14:1AAA
Destructive3.83:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.238 0 161.565);
  --foreground: oklch(0.789 0 171.254);
  --muted: oklch(0.271 0.015 18.11);
  --muted-foreground: oklch(0.717 0.025 17.739);
  --popover: oklch(0.204 0 180);
  --popover-foreground: oklch(0.869 0 165.964);
  --card: oklch(0.216 0 180);
  --card-foreground: oklch(0.829 0 180);
  --border: oklch(0.29 0 180);
  --input: oklch(0.321 0 180);
  --primary: oklch(0.59 0 164.055);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.805 0 169.695);
  --secondary-foreground: oklch(0.27 0 180);
  --accent: oklch(0.39 0 165.964);
  --accent-foreground: oklch(0.9 0 188.746);
  --destructive: oklch(0.637 0.249 29.413);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.59 0 164.055);
  --chart-1: oklch(0.59 0 164.055);
  --chart-2: oklch(0.805 0 169.695);
  --chart-3: oklch(0.39 0 165.964);
  --chart-4: oklch(0.829 0 180);
  --chart-5: oklch(0.583 0.009 17.421);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.238 0 161.565);
  --foreground: oklch(0.789 0 171.254);
  --muted: oklch(0.271 0.015 18.11);
  --muted-foreground: oklch(0.717 0.025 17.739);
  --popover: oklch(0.204 0 180);
  --popover-foreground: oklch(0.869 0 165.964);
  --card: oklch(0.216 0 180);
  --card-foreground: oklch(0.829 0 180);
  --border: oklch(0.29 0 180);
  --input: oklch(0.321 0 180);
  --primary: oklch(0.59 0 164.055);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.805 0 169.695);
  --secondary-foreground: oklch(0.27 0 180);
  --accent: oklch(0.39 0 165.964);
  --accent-foreground: oklch(0.9 0 188.746);
  --destructive: oklch(0.637 0.249 29.413);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.59 0 164.055);
  --chart-1: oklch(0.59 0 164.055);
  --chart-2: oklch(0.805 0 169.695);
  --chart-3: oklch(0.39 0 165.964);
  --chart-4: oklch(0.829 0 180);
  --chart-5: oklch(0.583 0.009 17.421);
}