One Dark Space Gray for shadcn/ui

One Dark Space Gray is a shadcn/ui theme built around a muted blue primary color (#9aa3b7) with muted blue accents (#3f4c64). The light mode uses a blue-tinted background (#212835). Dark mode keeps the muted blue primary (#9aa3b7) on a blue-tinted background (#212835).

Color palette

TokenLightDark
Background
#212835darkslategray
#212835darkslategray
Foreground
#bababasilver
#bababasilver
Card
#1d242fdarkslategray
#1d242fdarkslategray
Card foreground
#c7c7c7silver
#c7c7c7silver
Popover
#1b212cdarkslategray
#1b212cdarkslategray
Popover foreground
#d4d4d4lightgrey
#d4d4d4lightgrey
Primary
#9aa3b7darkgray
#9aa3b7darkgray
Primary foreground
#0d0e12black
#0d0e12black
Secondary
#3b3e44darkslategray
#3b3e44darkslategray
Secondary foreground
#d6d8dbgainsboro
#d6d8dbgainsboro
Muted
#2f343cdarkslategray
#2f343cdarkslategray
Muted foreground
#acb2bedarkgray
#acb2bedarkgray
Accent
#3f4c64darkslategray
#3f4c64darkslategray
Accent foreground
#e6e9eflavender
#e6e9eflavender
Destructive
#fe2e1borangered
#fe2e1borangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#31363fdarkslategray
#31363fdarkslategray
Input
#373d48darkslategray
#373d48darkslategray
Ring
#9aa3b7darkgray
#9aa3b7darkgray

Contrast

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

Light mode
Text on background7.58:1AAA
Text on card9.25:1AAA
Primary button7.63:1AAA
Secondary button7.47:1AAA
Muted text5.90:1AA
Accent7.10:1AAA
Destructive3.74:1AA Large
Dark mode
Text on background7.58:1AAA
Text on card9.25:1AAA
Primary button7.63:1AAA
Secondary button7.47:1AAA
Muted text5.90:1AA
Accent7.10:1AAA
Destructive3.74:1AA Large

CSS variables

Paste this into your globals.css to use One Dark Space Gray in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.277 0.026 262.647);
  --foreground: oklch(0.789 0 171.254);
  --muted: oklch(0.323 0.016 262.891);
  --muted-foreground: oklch(0.763 0.018 262.997);
  --popover: oklch(0.248 0.022 262.677);
  --popover-foreground: oklch(0.869 0 165.964);
  --card: oklch(0.258 0.023 262.666);
  --card-foreground: oklch(0.829 0 180);
  --border: oklch(0.332 0.018 262.867);
  --input: oklch(0.36 0.02 262.86);
  --primary: oklch(0.715 0.031 264.361);
  --primary-foreground: oklch(0.165 0.008 264.335);
  --secondary: oklch(0.364 0.011 264.43);
  --secondary-foreground: oklch(0.881 0.005 264.532);
  --accent: oklch(0.415 0.044 262.565);
  --accent-foreground: oklch(0.934 0.009 263.035);
  --destructive: oklch(0.642 0.241 30.07);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.715 0.031 264.361);
  --chart-1: oklch(0.715 0.031 264.361);
  --chart-2: oklch(0.364 0.011 264.43);
  --chart-3: oklch(0.415 0.044 262.565);
  --chart-4: oklch(0.393 0.012 264.427);
  --chart-5: oklch(0.712 0.036 264.313);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.277 0.026 262.647);
  --foreground: oklch(0.789 0 171.254);
  --muted: oklch(0.323 0.016 262.891);
  --muted-foreground: oklch(0.763 0.018 262.997);
  --popover: oklch(0.248 0.022 262.677);
  --popover-foreground: oklch(0.869 0 165.964);
  --card: oklch(0.258 0.023 262.666);
  --card-foreground: oklch(0.829 0 180);
  --border: oklch(0.332 0.018 262.867);
  --input: oklch(0.36 0.02 262.86);
  --primary: oklch(0.715 0.031 264.361);
  --primary-foreground: oklch(0.165 0.008 264.335);
  --secondary: oklch(0.364 0.011 264.43);
  --secondary-foreground: oklch(0.881 0.005 264.532);
  --accent: oklch(0.415 0.044 262.565);
  --accent-foreground: oklch(0.934 0.009 263.035);
  --destructive: oklch(0.642 0.241 30.07);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.715 0.031 264.361);
  --chart-1: oklch(0.715 0.031 264.361);
  --chart-2: oklch(0.364 0.011 264.43);
  --chart-3: oklch(0.415 0.044 262.565);
  --chart-4: oklch(0.393 0.012 264.427);
  --chart-5: oklch(0.712 0.036 264.313);
}