Electrocardiogram is a shadcn/ui theme built around a near-white primary color (#fafbf9) with muted light green accents (#cfd5cd). The light mode uses a neutral background (#fcfefb). Dark mode keeps the near-white primary (#fafbf9) on a green-tinted background (#081004).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfefbwhite | #081004black |
| Foreground | #000000black | #fafbf9snow |
| Card | #fcfefbwhite | #081004black |
| Card foreground | #000000black | #fafbf9snow |
| Popover | #fcfefbwhite | #081004black |
| Popover foreground | #000000black | #fafbf9snow |
| Primary | #fafbf9snow | #fafbf9snow |
| Primary foreground | #2b3527darkslategray | #2b3527darkslategray |
| Secondary | #cfd5cdlightgrey | #293126darkslategray |
| Secondary foreground | #363d33darkslategray | #c1ccbdsilver |
| Muted | #e9efe6beige | #121910black |
| Muted foreground | #5a6954dimgray | #9cab96darkseagreen |
| Accent | #cfd5cdlightgrey | #293126darkslategray |
| Accent foreground | #363d33darkslategray | #c1ccbdsilver |
| Destructive | #a71606firebrick | #e71f08red |
| Destructive foreground | #fee4e1mistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #fafbf9snow | #fafbf9snow |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.72:1 | AAA |
| Text on card | 20.72:1 | AAA |
| Primary button | 12.29:1 | AAA |
| Secondary button | 7.52:1 | AAA |
| Muted text | 5.02:1 | AA |
| Accent | 7.52:1 | AAA |
| Destructive | 6.28:1 | AA |
| Text on background | 18.59:1 | AAA |
| Text on card | 18.59:1 | AAA |
| Primary button | 12.29:1 | AAA |
| Secondary button | 8.09:1 | AAA |
| Muted text | 7.38:1 | AAA |
| Accent | 8.09:1 | AAA |
| Destructive | 4.56:1 | AA |
Paste this into your globals.css to use Electrocardiogram in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.995 0.005 136.041);
--foreground: oklch(0 0 0);
--muted: oklch(0.946 0.015 136.079);
--muted-foreground: oklch(0.501 0.037 136.307);
--popover: oklch(0.995 0.005 136.041);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.995 0.005 136.041);
--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.986 0.002 136.031);
--primary-foreground: oklch(0.316 0.029 136.391);
--secondary: oklch(0.867 0.013 136.076);
--secondary-foreground: oklch(0.351 0.02 136.234);
--accent: oklch(0.867 0.013 136.076);
--accent-foreground: oklch(0.351 0.02 136.234);
--destructive: oklch(0.467 0.18 30.503);
--destructive-foreground: oklch(0.94 0.029 25.264);
--ring: oklch(0.986 0.002 136.031);
--chart-1: oklch(0.986 0.002 136.031);
--chart-2: oklch(0.867 0.013 136.076);
--chart-3: oklch(0.867 0.013 136.076);
--chart-4: oklch(0.889 0.011 136.065);
--chart-5: oklch(0.986 0.003 136.032);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.161 0.03 135.111);
--foreground: oklch(0.986 0.002 136.031);
--muted: oklch(0.204 0.022 136.455);
--muted-foreground: oklch(0.724 0.034 136.197);
--popover: oklch(0.161 0.03 135.111);
--popover-foreground: oklch(0.986 0.002 136.031);
--card: oklch(0.161 0.03 135.111);
--card-foreground: oklch(0.986 0.002 136.031);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.986 0.002 136.031);
--primary-foreground: oklch(0.316 0.029 136.391);
--secondary: oklch(0.302 0.023 136.315);
--secondary-foreground: oklch(0.833 0.024 136.128);
--accent: oklch(0.302 0.023 136.315);
--accent-foreground: oklch(0.833 0.024 136.128);
--destructive: oklch(0.592 0.231 30.36);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.986 0.002 136.031);
--chart-1: oklch(0.986 0.002 136.031);
--chart-2: oklch(0.302 0.023 136.315);
--chart-3: oklch(0.302 0.023 136.315);
--chart-4: oklch(0.334 0.026 136.326);
--chart-5: oklch(0.986 0.003 136.032);
}