Zero for shadcn/ui

Zero is a shadcn/ui theme built around a muted deep blue primary color (#080b0d) with muted deep blue accents (#08080d). The light mode uses a neutral background (#fcfdfd). Dark mode keeps the muted deep blue primary (#080b0d) on a blue-tinted background (#05090b).

Color palette

TokenLightDark
Background
#fcfdfdwhite
#05090bblack
Foreground
#060f13black
#f9fafbghostwhite
Card
#f8fafcghostwhite
#060b0eblack
Card foreground
#050c0fblack
#fcfdfdwhite
Popover
#fcfdfdwhite
#05090bblack
Popover foreground
#060f13black
#f9fafbghostwhite
Primary
#080b0dblack
#080b0dblack
Primary foreground
#8babbbdarkgray
#8babbbdarkgray
Secondary
#080d0cblack
#080d0cblack
Secondary foreground
#8bbbb3darkseagreen
#8bbbb3darkseagreen
Muted
#f2f3f3whitesmoke
#0c0d0dblack
Muted foreground
#475c59darkslategray
#a3b8b4darkgray
Accent
#08080dblack
#08080dblack
Accent foreground
#8b93bblightslategray
#8b93bblightslategray
Destructive
#660f00maroon
#f52500orangered
Destructive foreground
#ffa899lightsalmon
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#080b0dblack
#080b0dblack

Contrast

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

Light mode
Text on background18.94:1AAA
Text on card18.88:1AAA
Primary button8.12:1AAA
Secondary button9.19:1AAA
Muted text6.40:1AA
Accent6.64:1AA
Destructive6.91:1AA
Dark mode
Text on background19.17:1AAA
Text on card19.35:1AAA
Primary button8.12:1AAA
Secondary button9.19:1AAA
Muted text9.31:1AAA
Accent6.64:1AA
Destructive4.08:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.001 228.77);
  --foreground: oklch(0.161 0.016 229.366);
  --muted: oklch(0.963 0.001 185.411);
  --muted-foreground: oklch(0.457 0.026 183.857);
  --popover: oklch(0.993 0.001 228.77);
  --popover-foreground: oklch(0.161 0.016 229.366);
  --card: oklch(0.985 0.003 228.789);
  --card-foreground: oklch(0.148 0.014 227.243);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.147 0.007 228.093);
  --primary-foreground: oklch(0.723 0.042 229.676);
  --secondary: oklch(0.152 0.009 184.256);
  --secondary-foreground: oklch(0.756 0.052 183.534);
  --accent: oklch(0.138 0.01 275.1);
  --accent-foreground: oklch(0.672 0.06 275.864);
  --destructive: oklch(0.331 0.122 33.006);
  --destructive-foreground: oklch(0.814 0.106 30.468);
  --ring: oklch(0.147 0.007 228.093);
  --chart-1: oklch(0.147 0.007 228.093);
  --chart-2: oklch(0.152 0.009 184.256);
  --chart-3: oklch(0.138 0.01 275.1);
  --chart-4: oklch(0.193 0.014 183.387);
  --chart-5: oklch(0.147 0.008 227.988);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.133 0.009 224.518);
  --foreground: oklch(0.985 0.002 228.775);
  --muted: oklch(0.159 0.002 185.094);
  --muted-foreground: oklch(0.765 0.024 184.617);
  --popover: oklch(0.133 0.009 224.518);
  --popover-foreground: oklch(0.985 0.002 228.775);
  --card: oklch(0.147 0.011 227.669);
  --card-foreground: oklch(0.993 0.001 228.763);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.147 0.007 228.093);
  --primary-foreground: oklch(0.723 0.042 229.676);
  --secondary: oklch(0.152 0.009 184.256);
  --secondary-foreground: oklch(0.756 0.052 183.534);
  --accent: oklch(0.138 0.01 275.1);
  --accent-foreground: oklch(0.672 0.06 275.864);
  --destructive: oklch(0.62 0.24 31.264);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.147 0.007 228.093);
  --chart-1: oklch(0.147 0.007 228.093);
  --chart-2: oklch(0.152 0.009 184.256);
  --chart-3: oklch(0.138 0.01 275.1);
  --chart-4: oklch(0.193 0.014 183.387);
  --chart-5: oklch(0.147 0.008 227.988);
}