Emergency for shadcn/ui

Emergency is a shadcn/ui theme built around a yellow primary color (#77683c) with purple accents (#683c77). The light mode uses a neutral background (#ffffff). Dark mode keeps the yellow primary (#77683c) on a yellow-tinted background (#0b0905).

Color palette

TokenLightDark
Background
#ffffffwhite
#0b0905black
Foreground
#000000black
#fdfdfcwhite
Card
#ffffffwhite
#0b0905black
Card foreground
#000000black
#fdfdfcwhite
Popover
#ffffffwhite
#0b0905black
Popover foreground
#000000black
#fdfdfcwhite
Primary
#77683cdarkolivegreen
#77683cdarkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#3c7768seagreen
#3c7768seagreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#cde4degainsboro
#1b322cdarkslategray
Muted foreground
#464e4cdarkslategray
#b1b9b7silver
Accent
#683c77rebeccapurple
#683c77rebeccapurple
Accent foreground
#f4eef6whitesmoke
#f4eef6whitesmoke
Destructive
#6e200cmaroon
#eb6847tomato
Destructive foreground
#f7c3b6lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#77683cdarkolivegreen
#77683cdarkolivegreen

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button5.49:1AA
Secondary button5.23:1AA
Muted text6.43:1AA
Accent7.37:1AAA
Destructive7.16:1AAA
Dark mode
Text on background19.53:1AAA
Text on card19.53:1AAA
Primary button5.49:1AA
Secondary button5.23:1AA
Muted text6.84:1AA
Accent7.37:1AAA
Destructive6.59: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 0 0);
  --muted: oklch(0.901 0.026 179.037);
  --muted-foreground: oklch(0.417 0.012 179.025);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.521 0.065 91.567);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.524 0.067 175.305);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.434 0.106 317.217);
  --accent-foreground: oklch(0.957 0.013 317.741);
  --destructive: oklch(0.365 0.115 34.759);
  --destructive-foreground: oklch(0.859 0.063 34.407);
  --ring: oklch(0.521 0.065 91.567);
  --chart-1: oklch(0.521 0.065 91.567);
  --chart-2: oklch(0.524 0.067 175.305);
  --chart-3: oklch(0.434 0.106 317.217);
  --chart-4: oklch(0.555 0.071 175.257);
  --chart-5: oklch(0.526 0.07 91.453);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.141 0.013 95.034);
  --foreground: oklch(0.994 0.002 91.425);
  --muted: oklch(0.295 0.031 176.323);
  --muted-foreground: oklch(0.78 0.01 179.484);
  --popover: oklch(0.141 0.013 95.034);
  --popover-foreground: oklch(0.994 0.002 91.425);
  --card: oklch(0.141 0.013 95.034);
  --card-foreground: oklch(0.994 0.002 91.425);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.521 0.065 91.567);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.524 0.067 175.305);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.434 0.106 317.217);
  --accent-foreground: oklch(0.957 0.013 317.741);
  --destructive: oklch(0.672 0.169 35.211);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.521 0.065 91.567);
  --chart-1: oklch(0.521 0.065 91.567);
  --chart-2: oklch(0.524 0.067 175.305);
  --chart-3: oklch(0.434 0.106 317.217);
  --chart-4: oklch(0.555 0.071 175.257);
  --chart-5: oklch(0.526 0.07 91.453);
}