Safe for shadcn/ui

Safe is a shadcn/ui theme built around a neutral gray primary color (#8a8f93) with muted light blue accents (#d7dde4). The light mode uses a neutral background (#f8fafc). Dark mode keeps the neutral gray primary (#8a8f93) on a neutral background (#020508).

Color palette

TokenLightDark
Background
#f8fafcghostwhite
#020508black
Foreground
#020508black
#f8fafbghostwhite
Card
#f5f7fawhitesmoke
#03070cblack
Card foreground
#010204black
#fcfcfdwhite
Popover
#f5f7fawhitesmoke
#03070cblack
Popover foreground
#010204black
#fcfcfdwhite
Primary
#8a8f93lightslategray
#8a8f93lightslategray
Primary foreground
#000000black
#000000black
Secondary
#d7dde4gainsboro
#2a2e32darkslategray
Secondary foreground
#374453darkslategray
#c2c7cbsilver
Muted
#dadee2gainsboro
#1d2125black
Muted foreground
#484a4bdarkslategray
#b4b5b7silver
Accent
#d7dde4gainsboro
#2a2e32darkslategray
Accent foreground
#374453darkslategray
#c2c7cbsilver
Destructive
#660c0amaroon
#e92420crimson
Destructive foreground
#f7adablightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8a8f93lightslategray
#8a8f93lightslategray

Contrast

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

Light mode
Text on background19.50:1AAA
Text on card19.35:1AAA
Primary button6.40:1AA
Secondary button7.28:1AAA
Muted text6.56:1AA
Accent7.28:1AAA
Destructive7.10:1AAA
Dark mode
Text on background19.52:1AAA
Text on card19.66:1AAA
Primary button6.40:1AA
Secondary button8.05:1AAA
Muted text7.90:1AAA
Accent8.05:1AAA
Destructive4.43:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.984 0.003 251.474);
  --foreground: oklch(0.111 0.012 243.964);
  --muted: oklch(0.898 0.008 251.519);
  --muted-foreground: oklch(0.408 0.003 251.514);
  --popover: oklch(0.976 0.004 251.486);
  --popover-foreground: oklch(0.088 0.009 243.964);
  --card: oklch(0.976 0.004 251.486);
  --card-foreground: oklch(0.088 0.009 243.964);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.646 0.009 251.557);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.896 0.012 251.555);
  --secondary-foreground: oklch(0.381 0.03 252.01);
  --accent: oklch(0.896 0.012 251.555);
  --accent-foreground: oklch(0.381 0.03 252.01);
  --destructive: oklch(0.329 0.123 27.954);
  --destructive-foreground: oklch(0.817 0.087 20.222);
  --ring: oklch(0.646 0.009 251.557);
  --chart-1: oklch(0.646 0.009 251.557);
  --chart-2: oklch(0.896 0.012 251.555);
  --chart-3: oklch(0.896 0.012 251.555);
  --chart-4: oklch(0.92 0.009 251.529);
  --chart-5: oklch(0.644 0.015 251.633);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.111 0.013 242.911);
  --foreground: oklch(0.984 0.003 251.472);
  --muted: oklch(0.245 0.011 251.77);
  --muted-foreground: oklch(0.772 0.003 251.479);
  --popover: oklch(0.127 0.015 243.551);
  --popover-foreground: oklch(0.992 0.001 251.461);
  --card: oklch(0.127 0.015 243.551);
  --card-foreground: oklch(0.992 0.001 251.461);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.646 0.009 251.557);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.298 0.009 251.671);
  --secondary-foreground: oklch(0.827 0.008 251.53);
  --accent: oklch(0.298 0.009 251.671);
  --accent-foreground: oklch(0.827 0.008 251.53);
  --destructive: oklch(0.599 0.228 28.24);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.646 0.009 251.557);
  --chart-1: oklch(0.646 0.009 251.557);
  --chart-2: oklch(0.298 0.009 251.671);
  --chart-3: oklch(0.298 0.009 251.671);
  --chart-4: oklch(0.328 0.01 251.678);
  --chart-5: oklch(0.644 0.015 251.633);
}