Perennial is a shadcn/ui theme built around a deep green primary color (#1d7811) with deep purple accents (#6c1178). The light mode uses a neutral background (#f8fdf7). Dark mode keeps the deep green primary (#1d7811) on a neutral background (#020402).
| Token | Light | Dark |
|---|---|---|
| Background | #f8fdf7mintcream | #020402black |
| Foreground | #040c03black | #f9fbf9mintcream |
| Card | #f8fdf7mintcream | #020402black |
| Card foreground | #040c03black | #f9fbf9mintcream |
| Popover | #f8fdf7mintcream | #020402black |
| Popover foreground | #040c03black | #f9fbf9mintcream |
| Primary | #1d7811forestgreen | #1d7811forestgreen |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #6c1178purple | #6c1178purple |
| Secondary foreground | #f1c5f7lavender | #f1c5f7lavender |
| Muted | #eee0f0lavender | #1d0f1fblack |
| Muted foreground | #514752darkslategray | #b7adb8darkgray |
| Accent | #6c1178purple | #6c1178purple |
| Accent foreground | #f1c5f7lavender | #f1c5f7lavender |
| Destructive | #d35309chocolate | #f67328tomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #1d7811forestgreen | #1d7811forestgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.18:1 | AAA |
| Text on card | 19.18:1 | AAA |
| Primary button | 5.56:1 | AA |
| Secondary button | 7.04:1 | AAA |
| Muted text | 6.98:1 | AA |
| Accent | 7.04:1 | AAA |
| Destructive | 4.20:1 | AA Large |
| Text on background | 19.82:1 | AAA |
| Text on card | 19.82:1 | AAA |
| Primary button | 5.56:1 | AA |
| Secondary button | 7.04:1 | AAA |
| Muted text | 8.49:1 | AAA |
| Accent | 7.04:1 | AAA |
| Destructive | 7.41:1 | AAA |
Paste this into your globals.css to use Perennial in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.988 0.008 142.084);
--foreground: oklch(0.142 0.029 140.277);
--muted: oklch(0.923 0.026 322.209);
--muted-foreground: oklch(0.412 0.021 322.287);
--popover: oklch(0.988 0.008 142.084);
--popover-foreground: oklch(0.142 0.029 140.277);
--card: oklch(0.988 0.008 142.084);
--card-foreground: oklch(0.142 0.029 140.277);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.503 0.158 141.602);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.391 0.17 322.553);
--secondary-foreground: oklch(0.877 0.082 322.417);
--accent: oklch(0.391 0.17 322.553);
--accent-foreground: oklch(0.877 0.082 322.417);
--destructive: oklch(0.602 0.176 42.764);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.503 0.158 141.602);
--chart-1: oklch(0.503 0.158 141.602);
--chart-2: oklch(0.391 0.17 322.553);
--chart-3: oklch(0.391 0.17 322.553);
--chart-4: oklch(0.421 0.184 322.526);
--chart-5: oklch(0.508 0.161 141.644);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.096 0.013 140.85);
--foreground: oklch(0.985 0.002 142.106);
--muted: oklch(0.196 0.038 322.682);
--muted-foreground: oklch(0.759 0.018 322.195);
--popover: oklch(0.096 0.013 140.85);
--popover-foreground: oklch(0.985 0.002 142.106);
--card: oklch(0.096 0.013 140.85);
--card-foreground: oklch(0.985 0.002 142.106);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.503 0.158 141.602);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.391 0.17 322.553);
--secondary-foreground: oklch(0.877 0.082 322.417);
--accent: oklch(0.391 0.17 322.553);
--accent-foreground: oklch(0.877 0.082 322.417);
--destructive: oklch(0.702 0.18 46.044);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.503 0.158 141.602);
--chart-1: oklch(0.503 0.158 141.602);
--chart-2: oklch(0.391 0.17 322.553);
--chart-3: oklch(0.391 0.17 322.553);
--chart-4: oklch(0.421 0.184 322.526);
--chart-5: oklch(0.508 0.161 141.644);
}