Alert for shadcn/ui

Alert is a shadcn/ui theme built around a muted light teal primary color (#e4eceb) with muted light red accents (#ece4e5). The light mode uses a neutral background (#f8fcfb). Dark mode keeps the muted light teal primary (#e4eceb) on a teal-tinted background (#030c0a).

Color palette

TokenLightDark
Background
#f8fcfbmintcream
#030c0ablack
Foreground
#010404black
#f9fbfbghostwhite
Card
#f8fcfbmintcream
#030c0ablack
Card foreground
#010404black
#f9fbfbghostwhite
Popover
#f8fcfbmintcream
#030c0ablack
Popover foreground
#010404black
#f9fbfbghostwhite
Primary
#e4eceblavender
#e4eceblavender
Primary foreground
#17211fblack
#17211fblack
Secondary
#ece4e5linen
#ece4e5linen
Secondary foreground
#5e4046darkolivegreen
#5e4046darkolivegreen
Muted
#eae6e7linen
#191516black
Muted foreground
#525151darkslategray
#aeadaddarkgray
Accent
#ece4e5linen
#ece4e5linen
Accent foreground
#5e4046darkolivegreen
#5e4046darkolivegreen
Destructive
#772408maroon
#d7410forangered
Destructive foreground
#fac8b7peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e4eceblavender
#e4eceblavender

Contrast

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

Light mode
Text on background19.91:1AAA
Text on card19.91:1AAA
Primary button13.76:1AAA
Secondary button7.30:1AAA
Muted text6.39:1AA
Accent7.30:1AAA
Destructive6.85:1AA
Dark mode
Text on background19.05:1AAA
Text on card19.05:1AAA
Primary button13.76:1AAA
Secondary button7.30:1AAA
Muted text8.09:1AAA
Accent7.30:1AAA
Destructive4.52:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.005 184.177);
  --foreground: oklch(0.101 0.014 184.027);
  --muted: oklch(0.928 0.005 4.443);
  --muted-foreground: oklch(0.436 0.002 4.445);
  --popover: oklch(0.988 0.005 184.177);
  --popover-foreground: oklch(0.101 0.014 184.027);
  --card: oklch(0.988 0.005 184.177);
  --card-foreground: oklch(0.101 0.014 184.027);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.937 0.01 184.039);
  --primary-foreground: oklch(0.238 0.016 182.442);
  --secondary: oklch(0.925 0.01 4.589);
  --secondary-foreground: oklch(0.407 0.043 7.036);
  --accent: oklch(0.925 0.01 4.589);
  --accent-foreground: oklch(0.407 0.043 7.036);
  --destructive: oklch(0.387 0.122 36.947);
  --destructive-foreground: oklch(0.873 0.062 39.245);
  --ring: oklch(0.937 0.01 184.039);
  --chart-1: oklch(0.937 0.01 184.039);
  --chart-2: oklch(0.925 0.01 4.589);
  --chart-3: oklch(0.925 0.01 4.589);
  --chart-4: oklch(0.95 0.006 4.49);
  --chart-5: oklch(0.938 0.011 183.996);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.143 0.016 183.462);
  --foreground: oklch(0.986 0.002 184.246);
  --muted: oklch(0.2 0.007 5.202);
  --muted-foreground: oklch(0.748 0.002 4.379);
  --popover: oklch(0.143 0.016 183.462);
  --popover-foreground: oklch(0.986 0.002 184.246);
  --card: oklch(0.143 0.016 183.462);
  --card-foreground: oklch(0.986 0.002 184.246);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.937 0.01 184.039);
  --primary-foreground: oklch(0.238 0.016 182.442);
  --secondary: oklch(0.925 0.01 4.589);
  --secondary-foreground: oklch(0.407 0.043 7.036);
  --accent: oklch(0.925 0.01 4.589);
  --accent-foreground: oklch(0.407 0.043 7.036);
  --destructive: oklch(0.588 0.194 36.134);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.937 0.01 184.039);
  --chart-1: oklch(0.937 0.01 184.039);
  --chart-2: oklch(0.925 0.01 4.589);
  --chart-3: oklch(0.925 0.01 4.589);
  --chart-4: oklch(0.95 0.006 4.49);
  --chart-5: oklch(0.938 0.011 183.996);
}