Ethical is a shadcn/ui theme built around a vivid green primary color (#63fd82) with vivid red accents (#fd8263). The light mode uses a neutral background (#f7fdf8). Dark mode keeps the vivid green primary (#63fd82) on a green-tinted background (#050b06).
| Token | Light | Dark |
|---|---|---|
| Background | #f7fdf8mintcream | #050b06black |
| Foreground | #061409black | #ffffffwhite |
| Card | #f7fdf8mintcream | #050b06black |
| Card foreground | #061409black | #ffffffwhite |
| Popover | #f7fdf8mintcream | #050b06black |
| Popover foreground | #061409black | #ffffffwhite |
| Primary | #63fd82lightgreen | #63fd82lightgreen |
| Primary foreground | #012d0ablack | #012d0ablack |
| Secondary | #8263fdmediumslateblue | #8263fdmediumslateblue |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #d9d5e6gainsboro | #1c192ablack |
| Muted foreground | #565658dimgray | #a8a7a9darkgray |
| Accent | #fd8263salmon | #fd8263salmon |
| Accent foreground | #2d0a01black | #2d0a01black |
| Destructive | #ce0303red | #f10404red |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #63fd82lightgreen | #63fd82lightgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.31:1 | AAA |
| Text on card | 18.31:1 | AAA |
| Primary button | 11.48:1 | AAA |
| Secondary button | 4.07:1 | AA Large |
| Muted text | 5.10:1 | AA |
| Accent | 7.38:1 | AAA |
| Destructive | 5.77:1 | AA |
| Text on background | 19.91:1 | AAA |
| Text on card | 19.91:1 | AAA |
| Primary button | 11.48:1 | AAA |
| Secondary button | 4.07:1 | AA Large |
| Muted text | 7.19:1 | AAA |
| Accent | 7.38:1 | AAA |
| Destructive | 4.40:1 | AA Large |
Paste this into your globals.css to use Ethical in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.988 0.009 151.863);
--foreground: oklch(0.173 0.031 149.726);
--muted: oklch(0.882 0.024 295.081);
--muted-foreground: oklch(0.453 0.003 295.464);
--popover: oklch(0.988 0.009 151.863);
--popover-foreground: oklch(0.173 0.031 149.726);
--card: oklch(0.988 0.009 151.863);
--card-foreground: oklch(0.173 0.031 149.726);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.884 0.21 147.385);
--primary-foreground: oklch(0.26 0.077 146.46);
--secondary: oklch(0.613 0.218 287.348);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.739 0.156 35.125);
--accent-foreground: oklch(0.204 0.062 39.561);
--destructive: oklch(0.535 0.218 29.108);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.884 0.21 147.385);
--chart-1: oklch(0.884 0.21 147.385);
--chart-2: oklch(0.613 0.218 287.348);
--chart-3: oklch(0.739 0.156 35.125);
--chart-4: oklch(0.647 0.198 288.85);
--chart-5: oklch(0.888 0.215 147.26);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.138 0.016 151.409);
--foreground: oklch(1 0 180);
--muted: oklch(0.224 0.033 292.681);
--muted-foreground: oklch(0.731 0.002 295.516);
--popover: oklch(0.138 0.016 151.409);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.138 0.016 151.409);
--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.884 0.21 147.385);
--primary-foreground: oklch(0.26 0.077 146.46);
--secondary: oklch(0.613 0.218 287.348);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.739 0.156 35.125);
--accent-foreground: oklch(0.204 0.062 39.561);
--destructive: oklch(0.603 0.246 29.13);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.884 0.21 147.385);
--chart-1: oklch(0.884 0.21 147.385);
--chart-2: oklch(0.613 0.218 287.348);
--chart-3: oklch(0.739 0.156 35.125);
--chart-4: oklch(0.647 0.198 288.85);
--chart-5: oklch(0.888 0.215 147.26);
}