Elm is a shadcn/ui theme built around a green primary color (#42e43f) with green accents (#3fe48f). The light mode uses a neutral background (#fbfefb). Dark mode keeps the green primary (#42e43f) on a green-tinted background (#041004).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfefbwhite | #041004black |
| Foreground | #030d03black | #fcfdfcwhite |
| Card | #f6fdf6mintcream | #051405black |
| Card foreground | #020802black | #ffffffwhite |
| Popover | #f6fdf6mintcream | #051405black |
| Popover foreground | #020802black | #ffffffwhite |
| Primary | #42e43flimegreen | #42e43flimegreen |
| Primary foreground | #0c4c0bdarkgreen | #0c4c0bdarkgreen |
| Secondary | #94e43fyellowgreen | #94e43fyellowgreen |
| Secondary foreground | #2c4c0bdarkgreen | #2c4c0bdarkgreen |
| Muted | #f0f2eewhitesmoke | #0f110dblack |
| Muted foreground | #5e625bdimgray | #a1a49ddarkgray |
| Accent | #3fe48fmediumaquamarine | #3fe48fmediumaquamarine |
| Accent foreground | #0b4c2adarkgreen | #0b4c2adarkgreen |
| Destructive | #c24b0fchocolate | #f17c41coral |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #42e43flimegreen | #42e43flimegreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.46:1 | AAA |
| Text on card | 19.62:1 | AAA |
| Primary button | 6.01:1 | AA |
| Secondary button | 6.23:1 | AA |
| Muted text | 5.51:1 | AA |
| Accent | 6.08:1 | AA |
| Destructive | 4.87:1 | AA |
| Text on background | 19.01:1 | AAA |
| Text on card | 18.89:1 | AAA |
| Primary button | 6.01:1 | AA |
| Secondary button | 6.23:1 | AA |
| Muted text | 7.49:1 | AAA |
| Accent | 6.08:1 | AA |
| Destructive | 7.67:1 | AAA |
Paste this into your globals.css to use Elm in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.006 145.059);
--foreground: oklch(0.142 0.032 143.119);
--muted: oklch(0.958 0.006 127.858);
--muted-foreground: oklch(0.491 0.013 128.094);
--popover: oklch(0.988 0.012 145.017);
--popover-foreground: oklch(0.123 0.028 143.124);
--card: oklch(0.988 0.012 145.017);
--card-foreground: oklch(0.123 0.028 143.124);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.805 0.241 142.73);
--primary-foreground: oklch(0.364 0.113 142.642);
--secondary: oklch(0.836 0.207 132.157);
--secondary-foreground: oklch(0.377 0.097 132.603);
--accent: oklch(0.815 0.18 155.564);
--accent-foreground: oklch(0.368 0.085 154.79);
--destructive: oklch(0.566 0.166 41.514);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.805 0.241 142.73);
--chart-1: oklch(0.805 0.241 142.73);
--chart-2: oklch(0.836 0.207 132.157);
--chart-3: oklch(0.815 0.18 155.564);
--chart-4: oklch(0.845 0.197 131.651);
--chart-5: oklch(0.812 0.248 142.692);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.157 0.033 143.318);
--foreground: oklch(0.993 0.002 145.089);
--muted: oklch(0.175 0.009 128.376);
--muted-foreground: oklch(0.715 0.012 127.979);
--popover: oklch(0.173 0.038 143.287);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.173 0.038 143.287);
--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.805 0.241 142.73);
--primary-foreground: oklch(0.364 0.113 142.642);
--secondary: oklch(0.836 0.207 132.157);
--secondary-foreground: oklch(0.377 0.097 132.603);
--accent: oklch(0.815 0.18 155.564);
--accent-foreground: oklch(0.368 0.085 154.79);
--destructive: oklch(0.709 0.161 45.263);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.805 0.241 142.73);
--chart-1: oklch(0.805 0.241 142.73);
--chart-2: oklch(0.836 0.207 132.157);
--chart-3: oklch(0.815 0.18 155.564);
--chart-4: oklch(0.845 0.197 131.651);
--chart-5: oklch(0.812 0.248 142.692);
}