Ecology is a shadcn/ui theme built around a red primary color (#922641) with blue accents (#264192). The light mode uses a neutral background (#ffffff). Dark mode keeps the red primary (#922641) on a neutral background (#040102).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #040102black |
| Foreground | #110407black | #fcf8f9snow |
| Card | #fcfcfcsnow | #080204black |
| Card foreground | #0d0305black | #fdfcfcsnow |
| Popover | #fcfcfcsnow | #080204black |
| Popover foreground | #0d0305black | #fdfcfcsnow |
| Primary | #922641brown | #922641brown |
| Primary foreground | #fbeff2lavenderblush | #fbeff2lavenderblush |
| Secondary | #419226forestgreen | #419226forestgreen |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #dbe4d7gainsboro | #1e281bblack |
| Muted foreground | #40463edarkslategray | #bbc1b9silver |
| Accent | #264192darkslateblue | #264192darkslateblue |
| Accent foreground | #eff2fbaliceblue | #eff2fbaliceblue |
| Destructive | #930d06darkred | #f62d23orangered |
| Destructive foreground | #fdd0cepink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #922641brown | #922641brown |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.10:1 | AAA |
| Text on card | 19.90:1 | AAA |
| Primary button | 7.28:1 | AAA |
| Secondary button | 3.91:1 | AA Large |
| Muted text | 7.45:1 | AAA |
| Accent | 8.35:1 | AAA |
| Destructive | 6.56:1 | AA |
| Text on background | 19.71:1 | AAA |
| Text on card | 20.06:1 | AAA |
| Primary button | 7.28:1 | AAA |
| Secondary button | 3.91:1 | AA Large |
| Muted text | 8.34:1 | AAA |
| Accent | 8.35:1 | AAA |
| Destructive | 3.95:1 | AA Large |
Paste this into your globals.css to use Ecology in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.132 0.029 1.493);
--muted: oklch(0.909 0.021 137.802);
--muted-foreground: oklch(0.387 0.015 137.832);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.119 0.025 0.107);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.119 0.025 0.107);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.447 0.144 10.687);
--primary-foreground: oklch(0.962 0.014 0.261);
--secondary: oklch(0.587 0.163 139.152);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.403 0.138 266.301);
--accent-foreground: oklch(0.961 0.013 271.285);
--destructive: oklch(0.422 0.165 29.504);
--destructive-foreground: oklch(0.896 0.051 21.675);
--ring: oklch(0.447 0.144 10.687);
--chart-1: oklch(0.447 0.144 10.687);
--chart-2: oklch(0.587 0.163 139.152);
--chart-3: oklch(0.403 0.138 266.301);
--chart-4: oklch(0.622 0.174 139.176);
--chart-5: oklch(0.449 0.149 11.374);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.084 0.014 359.794);
--foreground: oklch(0.983 0.004 359.974);
--muted: oklch(0.262 0.028 137.98);
--muted-foreground: oklch(0.803 0.013 137.79);
--popover: oklch(0.106 0.017 359.794);
--popover-foreground: oklch(0.991 0.002 359.919);
--card: oklch(0.106 0.017 359.794);
--card-foreground: oklch(0.991 0.002 359.919);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.447 0.144 10.687);
--primary-foreground: oklch(0.962 0.014 0.261);
--secondary: oklch(0.587 0.163 139.152);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.403 0.138 266.301);
--accent-foreground: oklch(0.961 0.013 271.285);
--destructive: oklch(0.628 0.234 29.017);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.447 0.144 10.687);
--chart-1: oklch(0.447 0.144 10.687);
--chart-2: oklch(0.587 0.163 139.152);
--chart-3: oklch(0.403 0.138 266.301);
--chart-4: oklch(0.622 0.174 139.176);
--chart-5: oklch(0.449 0.149 11.374);
}