Electric is a shadcn/ui theme built around a light green primary color (#b6ecbb) with light red accents (#ecbbb6). The light mode uses a neutral background (#ffffff). Dark mode keeps the light green primary (#b6ecbb) on a neutral background (#020803).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #020803black |
| Foreground | #050f06black | #f5faf6whitesmoke |
| Card | #ffffffwhite | #020803black |
| Card foreground | #050f06black | #f5faf6whitesmoke |
| Popover | #ffffffwhite | #020803black |
| Popover foreground | #050f06black | #f5faf6whitesmoke |
| Primary | #b6ecbbpowderblue | #b6ecbbpowderblue |
| Primary foreground | #17591edarkgreen | #17591edarkgreen |
| Secondary | #bbb6eclightsteelblue | #bbb6eclightsteelblue |
| Secondary foreground | #1e1759midnightblue | #1e1759midnightblue |
| Muted | #eceaf5lavender | #0b0a15black |
| Muted foreground | #3b394cdarkslategray | #b5b3c6silver |
| Accent | #ecbbb6lightpink | #ecbbb6lightpink |
| Accent foreground | #591e17maroon | #591e17maroon |
| Destructive | #bb0d07firebrick | #f83730crimson |
| Destructive foreground | #fff5f5lavenderblush | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #b6ecbbpowderblue | #b6ecbbpowderblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.49:1 | AAA |
| Text on card | 19.49:1 | AAA |
| Primary button | 6.33:1 | AA |
| Secondary button | 8.34:1 | AAA |
| Muted text | 9.43:1 | AAA |
| Accent | 7.63:1 | AAA |
| Destructive | 6.18:1 | AA |
| Text on background | 19.14:1 | AAA |
| Text on card | 19.14:1 | AAA |
| Primary button | 6.33:1 | AA |
| Secondary button | 8.34:1 | AAA |
| Muted text | 9.57:1 | AAA |
| Accent | 7.63:1 | AAA |
| Destructive | 3.77:1 | AA Large |
Paste this into your globals.css to use Electric in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.155 0.026 147.156);
--muted: oklch(0.942 0.014 290.734);
--muted-foreground: oklch(0.354 0.032 289.236);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.155 0.026 147.156);
--card: oklch(1 0 180);
--card-foreground: oklch(0.155 0.026 147.156);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.894 0.086 147.448);
--primary-foreground: oklch(0.41 0.113 144.631);
--secondary: oklch(0.799 0.076 289.133);
--secondary-foreground: oklch(0.263 0.113 279.712);
--accent: oklch(0.835 0.057 25.693);
--accent-foreground: oklch(0.325 0.089 29.182);
--destructive: oklch(0.501 0.2 29.285);
--destructive-foreground: oklch(0.979 0.01 19.747);
--ring: oklch(0.894 0.086 147.448);
--chart-1: oklch(0.894 0.086 147.448);
--chart-2: oklch(0.799 0.076 289.133);
--chart-3: oklch(0.835 0.057 25.693);
--chart-4: oklch(0.833 0.063 289.543);
--chart-5: oklch(0.895 0.091 147.391);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.122 0.022 147.332);
--foreground: oklch(0.979 0.007 148.51);
--muted: oklch(0.152 0.022 288.051);
--muted-foreground: oklch(0.775 0.026 290.368);
--popover: oklch(0.122 0.022 147.332);
--popover-foreground: oklch(0.979 0.007 148.51);
--card: oklch(0.122 0.022 147.332);
--card-foreground: oklch(0.979 0.007 148.51);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.894 0.086 147.448);
--primary-foreground: oklch(0.41 0.113 144.631);
--secondary: oklch(0.799 0.076 289.133);
--secondary-foreground: oklch(0.263 0.113 279.712);
--accent: oklch(0.835 0.057 25.693);
--accent-foreground: oklch(0.325 0.089 29.182);
--destructive: oklch(0.638 0.228 27.954);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.894 0.086 147.448);
--chart-1: oklch(0.894 0.086 147.448);
--chart-2: oklch(0.799 0.076 289.133);
--chart-3: oklch(0.835 0.057 25.693);
--chart-4: oklch(0.833 0.063 289.543);
--chart-5: oklch(0.895 0.091 147.391);
}