Alert is a shadcn/ui theme built around a muted deep blue primary color (#1b2228) with muted deep green accents (#22281b). The light mode uses a neutral background (#f7fafd). Dark mode keeps the muted deep blue primary (#1b2228) on a blue-tinted background (#070b0d).
| Token | Light | Dark |
|---|---|---|
| Background | #f7fafdghostwhite | #070b0dblack |
| Foreground | #050b0fblack | #ffffffwhite |
| Card | #f2f8fcaliceblue | #090d11black |
| Card foreground | #04080bblack | #ffffffwhite |
| Popover | #f2f8fcaliceblue | #090d11black |
| Popover foreground | #04080bblack | #ffffffwhite |
| Primary | #1b2228black | #1b2228black |
| Primary foreground | #acbcc8silver | #acbcc8silver |
| Secondary | #281b22black | #281b22black |
| Secondary foreground | #c8acbcsilver | #c8acbcsilver |
| Muted | #f5f0f3whitesmoke | #0f0a0dblack |
| Muted foreground | #635a5fdimgray | #a59ca1darkgray |
| Accent | #22281bblack | #22281bblack |
| Accent foreground | #bcc8acsilver | #bcc8acsilver |
| Destructive | #8d110cdarkred | #ed3b35crimson |
| Destructive foreground | #fbd2d0pink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #1b2228black | #1b2228black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.93:1 | AAA |
| Text on card | 18.80:1 | AAA |
| Primary button | 8.24:1 | AAA |
| Secondary button | 7.96:1 | AAA |
| Muted text | 5.89:1 | AA |
| Accent | 8.66:1 | AAA |
| Destructive | 6.88:1 | AA |
| Text on background | 19.77:1 | AAA |
| Text on card | 19.46:1 | AAA |
| Primary button | 8.24:1 | AAA |
| Secondary button | 7.96:1 | AAA |
| Muted text | 7.34:1 | AAA |
| Accent | 8.66:1 | AAA |
| Destructive | 3.96:1 | AA Large |
Paste this into your globals.css to use Alert in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.984 0.005 238.441);
--foreground: oklch(0.145 0.014 236.032);
--muted: oklch(0.959 0.006 341.168);
--muted-foreground: oklch(0.477 0.015 341.724);
--popover: oklch(0.976 0.008 238.481);
--popover-foreground: oklch(0.131 0.012 232.347);
--card: oklch(0.976 0.008 238.481);
--card-foreground: oklch(0.131 0.012 232.347);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.248 0.015 239.322);
--primary-foreground: oklch(0.788 0.024 238.808);
--secondary: oklch(0.24 0.025 343.293);
--secondary-foreground: oklch(0.774 0.039 342.135);
--accent: oklch(0.266 0.025 126.411);
--accent-foreground: oklch(0.816 0.04 125.731);
--destructive: oklch(0.412 0.158 28.796);
--destructive-foreground: oklch(0.897 0.047 20.39);
--ring: oklch(0.248 0.015 239.322);
--chart-1: oklch(0.248 0.015 239.322);
--chart-2: oklch(0.24 0.025 343.293);
--chart-3: oklch(0.266 0.025 126.411);
--chart-4: oklch(0.27 0.03 343.426);
--chart-5: oklch(0.248 0.018 239.487);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.145 0.009 237.046);
--foreground: oklch(1 0 180);
--muted: oklch(0.154 0.01 342.486);
--muted-foreground: oklch(0.702 0.013 341.455);
--popover: oklch(0.158 0.011 239.109);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.158 0.011 239.109);
--card-foreground: oklch(1 0 180);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.248 0.015 239.322);
--primary-foreground: oklch(0.788 0.024 238.808);
--secondary: oklch(0.24 0.025 343.293);
--secondary-foreground: oklch(0.774 0.039 342.135);
--accent: oklch(0.266 0.025 126.411);
--accent-foreground: oklch(0.816 0.04 125.731);
--destructive: oklch(0.625 0.215 27.514);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.248 0.015 239.322);
--chart-1: oklch(0.248 0.015 239.322);
--chart-2: oklch(0.24 0.025 343.293);
--chart-3: oklch(0.266 0.025 126.411);
--chart-4: oklch(0.27 0.03 343.426);
--chart-5: oklch(0.248 0.018 239.487);
}