Electric is a shadcn/ui theme built around a near-black primary color (#030401) with near-black accents (#020104). The light mode uses a neutral background (#fdfdfc). Dark mode keeps the near-black primary (#030401) on a green-tinted background (#0c0e07).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfdfcwhite | #0c0e07black |
| Foreground | #121405black | #ffffffwhite |
| Card | #fbfcf8snow | #101109black |
| Card foreground | #0e1004black | #ffffffwhite |
| Popover | #fbfcf8snow | #101109black |
| Popover foreground | #0e1004black | #ffffffwhite |
| Primary | #030401black | #030401black |
| Primary foreground | #8ea130olivedrab | #8ea130olivedrab |
| Secondary | #020104black | #020104black |
| Secondary foreground | #bdb4e9lightsteelblue | #bdb4e9lightsteelblue |
| Muted | #d8d7e0gainsboro | #211f28black |
| Muted foreground | #3d3b4adarkslategray | #b8b5c4silver |
| Accent | #020104black | #020104black |
| Accent foreground | #bdb4e9lightsteelblue | #bdb4e9lightsteelblue |
| Destructive | #b43e13firebrick | #eb6b3dtomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #030401black | #030401black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.33:1 | AAA |
| Text on card | 18.60:1 | AAA |
| Primary button | 7.13:1 | AAA |
| Secondary button | 10.77:1 | AAA |
| Muted text | 7.63:1 | AAA |
| Accent | 10.77:1 | AAA |
| Destructive | 5.77:1 | AA |
| Text on background | 19.44:1 | AAA |
| Text on card | 19.00:1 | AAA |
| Primary button | 7.13:1 | AAA |
| Secondary button | 10.77:1 | AAA |
| Muted text | 8.08:1 | AAA |
| Accent | 10.77:1 | AAA |
| Destructive | 6.70:1 | AA |
Paste this into your globals.css to use Electric in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.003 114.113);
--foreground: oklch(0.185 0.029 116.719);
--muted: oklch(0.882 0.013 293.796);
--muted-foreground: oklch(0.361 0.025 292.738);
--popover: oklch(0.989 0.005 114.16);
--popover-foreground: oklch(0.167 0.026 116.174);
--card: oklch(0.989 0.005 114.16);
--card-foreground: oklch(0.167 0.026 116.174);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.103 0.014 114.851);
--primary-foreground: oklch(0.673 0.137 118.469);
--secondary: oklch(0.078 0.016 292.626);
--secondary-foreground: oklch(0.796 0.074 292.276);
--accent: oklch(0.078 0.016 292.626);
--accent-foreground: oklch(0.796 0.074 292.276);
--destructive: oklch(0.526 0.161 37.937);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.103 0.014 114.851);
--chart-1: oklch(0.103 0.014 114.851);
--chart-2: oklch(0.078 0.016 292.626);
--chart-3: oklch(0.078 0.016 292.626);
--chart-4: oklch(0.124 0.027 291.708);
--chart-5: oklch(0.103 0.015 114.885);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.158 0.014 115.386);
--foreground: oklch(1 0 180);
--muted: oklch(0.245 0.018 292.697);
--muted-foreground: oklch(0.781 0.021 293.57);
--popover: oklch(0.173 0.017 115.822);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.173 0.017 115.822);
--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.103 0.014 114.851);
--primary-foreground: oklch(0.673 0.137 118.469);
--secondary: oklch(0.078 0.016 292.626);
--secondary-foreground: oklch(0.796 0.074 292.276);
--accent: oklch(0.078 0.016 292.626);
--accent-foreground: oklch(0.796 0.074 292.276);
--destructive: oklch(0.676 0.169 39.744);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.103 0.014 114.851);
--chart-1: oklch(0.103 0.014 114.851);
--chart-2: oklch(0.078 0.016 292.626);
--chart-3: oklch(0.078 0.016 292.626);
--chart-4: oklch(0.124 0.027 291.708);
--chart-5: oklch(0.103 0.015 114.885);
}