Emergency for shadcn/ui

Emergency is a shadcn/ui theme built around a near-black primary color (#0a0a0a) with near-black accents (#0a0a0a). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#0a0a0a) on a yellow-tinted background (#0e0e06).

Color palette

TokenLightDark
Background
#ffffffwhite
#0e0e06black
Foreground
#141405black
#faf9f5whitesmoke
Card
#ffffffwhite
#0e0e06black
Card foreground
#141405black
#faf9f5whitesmoke
Popover
#ffffffwhite
#0e0e06black
Popover foreground
#141405black
#faf9f5whitesmoke
Primary
#0a0a0ablack
#0a0a0ablack
Primary foreground
#a4a4a2darkgray
#a4a4a2darkgray
Secondary
#0a0a0ablack
#0a0a0ablack
Secondary foreground
#a2a2a4darkgray
#a2a2a4darkgray
Muted
#d0d1e6gainsboro
#19192fblack
Muted foreground
#47485cdarkslategray
#a3a3b8darkgray
Accent
#0a0a0ablack
#0a0a0ablack
Accent foreground
#a2a2a4darkgray
#a2a2a4darkgray
Destructive
#c02c07firebrick
#dd3308orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0a0a0ablack
#0a0a0ablack

Contrast

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

Light mode
Text on background18.55:1AAA
Text on card18.55:1AAA
Primary button7.91:1AAA
Secondary button7.76:1AAA
Muted text5.93:1AA
Accent7.76:1AAA
Destructive5.82:1AA
Dark mode
Text on background18.38:1AAA
Text on card18.38:1AAA
Primary button7.91:1AAA
Secondary button7.76:1AAA
Muted text6.93:1AA
Accent7.76:1AAA
Destructive4.60:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.186 0.027 107.103);
  --muted: oklch(0.867 0.029 284.193);
  --muted-foreground: oklch(0.408 0.034 283.222);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.186 0.027 107.103);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.186 0.027 107.103);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.146 0 104.867);
  --primary-foreground: oklch(0.718 0.003 104.87);
  --secondary: oklch(0.145 0 284.748);
  --secondary-foreground: oklch(0.714 0.003 284.745);
  --accent: oklch(0.145 0 284.748);
  --accent-foreground: oklch(0.714 0.003 284.745);
  --destructive: oklch(0.528 0.189 33.432);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.146 0 104.867);
  --chart-1: oklch(0.146 0 104.867);
  --chart-2: oklch(0.145 0 284.748);
  --chart-3: oklch(0.145 0 284.748);
  --chart-4: oklch(0.181 0.001 284.74);
  --chart-5: oklch(0.147 0.002 105.003);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.161 0.016 106.516);
  --foreground: oklch(0.982 0.006 104.908);
  --muted: oklch(0.226 0.041 281.051);
  --muted-foreground: oklch(0.723 0.03 284.064);
  --popover: oklch(0.161 0.016 106.516);
  --popover-foreground: oklch(0.982 0.006 104.908);
  --card: oklch(0.161 0.016 106.516);
  --card-foreground: oklch(0.982 0.006 104.908);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.146 0 104.867);
  --primary-foreground: oklch(0.718 0.003 104.87);
  --secondary: oklch(0.145 0 284.748);
  --secondary-foreground: oklch(0.714 0.003 284.745);
  --accent: oklch(0.145 0 284.748);
  --accent-foreground: oklch(0.714 0.003 284.745);
  --destructive: oklch(0.587 0.211 33.27);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.146 0 104.867);
  --chart-1: oklch(0.146 0 104.867);
  --chart-2: oklch(0.145 0 284.748);
  --chart-3: oklch(0.145 0 284.748);
  --chart-4: oklch(0.181 0.001 284.74);
  --chart-5: oklch(0.147 0.002 105.003);
}