Alert for shadcn/ui

Alert is a shadcn/ui theme built around a muted light yellow primary color (#e8e8e3) with muted light purple accents (#e8e3e8). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted light yellow primary (#e8e8e3) on a yellow-tinted background (#0a0a05).

Color palette

TokenLightDark
Background
#ffffffwhite
#0a0a05black
Foreground
#151404black
#fbfbf9snow
Card
#ffffffwhite
#0a0a05black
Card foreground
#151404black
#fbfbf9snow
Popover
#ffffffwhite
#0a0a05black
Popover foreground
#151404black
#fbfbf9snow
Primary
#e8e8e3gainsboro
#e8e8e3gainsboro
Primary foreground
#545345darkolivegreen
#545345darkolivegreen
Secondary
#e3e8e8gainsboro
#e3e8e8gainsboro
Secondary foreground
#455453darkslategray
#455453darkslategray
Muted
#eef7f6whitesmoke
#081111black
Muted foreground
#526b69dimgray
#94adacdarkgray
Accent
#e8e3e8gainsboro
#e8e3e8gainsboro
Accent foreground
#534554darkslategray
#534554darkslategray
Destructive
#ae490fsienna
#ec6c22chocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e8e8e3gainsboro
#e8e8e3gainsboro

Contrast

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

Light mode
Text on background18.52:1AAA
Text on card18.52:1AAA
Primary button6.31:1AA
Secondary button6.41:1AA
Muted text5.24:1AA
Accent7.06:1AAA
Destructive5.59:1AA
Dark mode
Text on background19.16:1AAA
Text on card19.16:1AAA
Primary button6.31:1AA
Secondary button6.41:1AA
Muted text8.02:1AAA
Accent7.06:1AAA
Destructive6.74:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.188 0.03 106.384);
  --muted: oklch(0.968 0.009 193.414);
  --muted-foreground: oklch(0.506 0.029 192.472);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.188 0.03 106.384);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.188 0.03 106.384);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.929 0.006 104.091);
  --primary-foreground: oklch(0.44 0.023 104.825);
  --secondary: oklch(0.927 0.005 193.49);
  --secondary-foreground: oklch(0.433 0.019 192.734);
  --accent: oklch(0.921 0.009 324.184);
  --accent-foreground: oklch(0.41 0.031 324.559);
  --destructive: oklch(0.531 0.146 44.583);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.929 0.006 104.091);
  --chart-1: oklch(0.929 0.006 104.091);
  --chart-2: oklch(0.927 0.005 193.49);
  --chart-3: oklch(0.921 0.009 324.184);
  --chart-4: oklch(0.949 0.004 193.527);
  --chart-5: oklch(0.931 0.008 104.126);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.142 0.011 105.573);
  --foreground: oklch(0.988 0.003 104.031);
  --muted: oklch(0.169 0.014 192.048);
  --muted-foreground: oklch(0.728 0.027 192.871);
  --popover: oklch(0.142 0.011 105.573);
  --popover-foreground: oklch(0.988 0.003 104.031);
  --card: oklch(0.142 0.011 105.573);
  --card-foreground: oklch(0.988 0.003 104.031);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.929 0.006 104.091);
  --primary-foreground: oklch(0.44 0.023 104.825);
  --secondary: oklch(0.927 0.005 193.49);
  --secondary-foreground: oklch(0.433 0.019 192.734);
  --accent: oklch(0.921 0.009 324.184);
  --accent-foreground: oklch(0.41 0.031 324.559);
  --destructive: oklch(0.677 0.177 45.723);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.929 0.006 104.091);
  --chart-1: oklch(0.929 0.006 104.091);
  --chart-2: oklch(0.927 0.005 193.49);
  --chart-3: oklch(0.921 0.009 324.184);
  --chart-4: oklch(0.949 0.004 193.527);
  --chart-5: oklch(0.931 0.008 104.126);
}