Larch is a shadcn/ui theme built around a vivid green primary color (#7ca102) with vivid green accents (#2da102). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid green primary (#7ca102) on a green-tinted background (#0a0c04).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #0a0c04black |
| Foreground | #0e1103black | #fbfbf9snow |
| Card | #fcfcfcsnow | #0d1005black |
| Card foreground | #0a0d02black | #fdfdfcwhite |
| Popover | #fcfcfcsnow | #0d1005black |
| Popover foreground | #0a0d02black | #fdfdfcwhite |
| Primary | #7ca102olive | #7ca102olive |
| Primary foreground | #000000black | #000000black |
| Secondary | #a17702darkgoldenrod | #a17702darkgoldenrod |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #efeeeblinen | #141310black |
| Muted foreground | #545045darkolivegreen | #bab6abdarkgray |
| Accent | #2da102forestgreen | #2da102forestgreen |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #bc0f06firebrick | #f8352aorangered |
| Destructive foreground | #fff6f5lavenderblush | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #7ca102olive | #7ca102olive |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.08:1 | AAA |
| Text on card | 19.17:1 | AAA |
| Primary button | 6.93:1 | AA |
| Secondary button | 4.09:1 | AA Large |
| Muted text | 6.93:1 | AA |
| Accent | 3.39:1 | AA Large |
| Destructive | 6.15:1 | AA |
| Text on background | 19.03:1 | AAA |
| Text on card | 18.91:1 | AAA |
| Primary button | 6.93:1 | AA |
| Secondary button | 4.09:1 | AA Large |
| Muted text | 9.18:1 | AAA |
| Accent | 3.39:1 | AA Large |
| Destructive | 3.78:1 | AA Large |
Paste this into your globals.css to use Larch in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.17 0.03 119.169);
--muted: oklch(0.949 0.004 90.153);
--muted-foreground: oklch(0.432 0.019 90.379);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.151 0.026 118.055);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.151 0.026 118.055);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.657 0.163 124.418);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.594 0.121 83.438);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.62 0.2 140.393);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.504 0.201 29.55);
--destructive-foreground: oklch(0.979 0.01 21.017);
--ring: oklch(0.657 0.163 124.418);
--chart-1: oklch(0.657 0.163 124.418);
--chart-2: oklch(0.594 0.121 83.438);
--chart-3: oklch(0.62 0.2 140.393);
--chart-4: oklch(0.634 0.13 83.226);
--chart-5: oklch(0.663 0.166 124.587);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.147 0.02 117.641);
--foreground: oklch(0.987 0.003 117.141);
--muted: oklch(0.186 0.006 90.33);
--muted-foreground: oklch(0.777 0.016 90.268);
--popover: oklch(0.164 0.023 118.779);
--popover-foreground: oklch(0.994 0.002 117.11);
--card: oklch(0.164 0.023 118.779);
--card-foreground: oklch(0.994 0.002 117.11);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.657 0.163 124.418);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.594 0.121 83.438);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.62 0.2 140.393);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.638 0.231 28.745);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.657 0.163 124.418);
--chart-1: oklch(0.657 0.163 124.418);
--chart-2: oklch(0.594 0.121 83.438);
--chart-3: oklch(0.62 0.2 140.393);
--chart-4: oklch(0.634 0.13 83.226);
--chart-5: oklch(0.663 0.166 124.587);
}