Alert is a shadcn/ui theme built around a green primary color (#70c791) with teal accents (#70c7bd). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#70c791) on a green-tinted background (#060e09).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #060e09black |
| Foreground | #020804black | #f6f9f7whitesmoke |
| Card | #fcfcfcsnow | #07120cblack |
| Card foreground | #010402black | #f9fbfamintcream |
| Popover | #fcfcfcsnow | #07120cblack |
| Popover foreground | #010402black | #f9fbfamintcream |
| Primary | #70c791mediumaquamarine | #70c791mediumaquamarine |
| Primary foreground | #010402black | #010402black |
| Secondary | #7ac770darkseagreen | #7ac770darkseagreen |
| Secondary foreground | #020401black | #020401black |
| Muted | #eaecealinen | #141513black |
| Muted foreground | #595f58dimgray | #a0a7a0darkgray |
| Accent | #70c7bdmediumaquamarine | #70c7bdmediumaquamarine |
| Accent foreground | #010403black | #010403black |
| Destructive | #a21811firebrick | #d92017crimson |
| Destructive foreground | #fde9e8linen | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #70c791mediumaquamarine | #70c791mediumaquamarine |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.21:1 | AAA |
| Text on card | 20.15:1 | AAA |
| Primary button | 10.09:1 | AAA |
| Secondary button | 10.05:1 | AAA |
| Muted text | 5.50:1 | AA |
| Accent | 10.41:1 | AAA |
| Destructive | 6.74:1 | AA |
| Text on background | 18.39:1 | AAA |
| Text on card | 18.33:1 | AAA |
| Primary button | 10.09:1 | AAA |
| Secondary button | 10.05:1 | AAA |
| Muted text | 7.42:1 | AAA |
| Accent | 10.41:1 | AAA |
| Destructive | 5.03:1 | AA |
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.123 0.018 159.296);
--muted: oklch(0.94 0.003 142.101);
--muted-foreground: oklch(0.479 0.014 142.011);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.098 0.014 159.296);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.098 0.014 159.296);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.761 0.116 155.365);
--primary-foreground: oklch(0.097 0.011 159.331);
--secondary: oklch(0.759 0.143 141.499);
--secondary-foreground: oklch(0.096 0.014 140.757);
--accent: oklch(0.773 0.086 185.885);
--accent-foreground: oklch(0.098 0.009 188.383);
--destructive: oklch(0.457 0.172 29.112);
--destructive-foreground: oklch(0.949 0.021 21.185);
--ring: oklch(0.761 0.116 155.365);
--chart-1: oklch(0.761 0.116 155.365);
--chart-2: oklch(0.759 0.143 141.499);
--chart-3: oklch(0.773 0.086 185.885);
--chart-4: oklch(0.777 0.133 141.546);
--chart-5: oklch(0.767 0.123 155.09);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.155 0.018 158.159);
--foreground: oklch(0.979 0.005 159.362);
--muted: oklch(0.195 0.005 142.026);
--muted-foreground: oklch(0.721 0.013 142.052);
--popover: oklch(0.169 0.021 156.75);
--popover-foreground: oklch(0.986 0.003 159.398);
--card: oklch(0.169 0.021 156.75);
--card-foreground: oklch(0.986 0.003 159.398);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.761 0.116 155.365);
--primary-foreground: oklch(0.097 0.011 159.331);
--secondary: oklch(0.759 0.143 141.499);
--secondary-foreground: oklch(0.096 0.014 140.757);
--accent: oklch(0.773 0.086 185.885);
--accent-foreground: oklch(0.098 0.009 188.383);
--destructive: oklch(0.567 0.217 29.242);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.761 0.116 155.365);
--chart-1: oklch(0.761 0.116 155.365);
--chart-2: oklch(0.759 0.143 141.499);
--chart-3: oklch(0.773 0.086 185.885);
--chart-4: oklch(0.777 0.133 141.546);
--chart-5: oklch(0.767 0.123 155.09);
}