Ethical is a shadcn/ui theme built around a green primary color (#a6c95e) with violet accents (#825ec9). The light mode uses a neutral background (#fbfdf7). Dark mode keeps the green primary (#a6c95e) on a neutral background (#030401).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfdf7snow | #030401black |
| Foreground | #0c1004black | #ffffffwhite |
| Card | #f9fbf3floralwhite | #060803black |
| Card foreground | #090c03black | #ffffffwhite |
| Popover | #fbfdf7snow | #030401black |
| Popover foreground | #0c1004black | #ffffffwhite |
| Primary | #a6c95edarkkhaki | #a6c95edarkkhaki |
| Primary foreground | #000000black | #000000black |
| Secondary | #825ec9slateblue | #825ec9slateblue |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #efeef1whitesmoke | #0f0e11black |
| Muted foreground | #535158dimgray | #aaa7aedarkgray |
| Accent | #825ec9slateblue | #825ec9slateblue |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #983706saddlebrown | #f55f14orangered |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #a6c95edarkkhaki | #a6c95edarkkhaki |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.71:1 | AAA |
| Text on card | 18.90:1 | AAA |
| Primary button | 11.17:1 | AAA |
| Secondary button | 4.76:1 | AA |
| Muted text | 6.78:1 | AA |
| Accent | 4.76:1 | AA |
| Destructive | 7.30:1 | AAA |
| Text on background | 20.57:1 | AAA |
| Text on card | 20.16:1 | AAA |
| Primary button | 11.17:1 | AAA |
| Secondary button | 4.76:1 | AA |
| Muted text | 8.10:1 | AAA |
| Accent | 4.76:1 | AA |
| Destructive | 6.53:1 | AA |
Paste this into your globals.css to use Ethical in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.007 121.608);
--foreground: oklch(0.165 0.026 122.861);
--muted: oklch(0.952 0.003 301.436);
--muted-foreground: oklch(0.439 0.011 301.08);
--popover: oklch(0.99 0.007 121.608);
--popover-foreground: oklch(0.165 0.026 122.861);
--card: oklch(0.985 0.011 121.666);
--card-foreground: oklch(0.147 0.022 121.473);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.788 0.141 124.843);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.57 0.16 296.333);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.57 0.16 296.333);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.469 0.14 41.13);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.788 0.141 124.843);
--chart-1: oklch(0.788 0.141 124.843);
--chart-2: oklch(0.57 0.16 296.333);
--chart-3: oklch(0.57 0.16 296.333);
--chart-4: oklch(0.601 0.149 297.083);
--chart-5: oklch(0.796 0.148 125.026);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.1 0.013 121.199);
--foreground: oklch(1 0 180);
--muted: oklch(0.166 0.005 300.988);
--muted-foreground: oklch(0.734 0.01 301.276);
--popover: oklch(0.1 0.013 121.199);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.127 0.016 121.199);
--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.788 0.141 124.843);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.57 0.16 296.333);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.57 0.16 296.333);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.673 0.199 41.327);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.788 0.141 124.843);
--chart-1: oklch(0.788 0.141 124.843);
--chart-2: oklch(0.57 0.16 296.333);
--chart-3: oklch(0.57 0.16 296.333);
--chart-4: oklch(0.601 0.149 297.083);
--chart-5: oklch(0.796 0.148 125.026);
}