Electric is a shadcn/ui theme built around a neutral gray primary color (#606466) with neutral gray accents (#666360). The light mode uses a neutral background (#f7fafd). Dark mode keeps the neutral gray primary (#606466) on a blue-tinted background (#05080b).
| Token | Light | Dark |
|---|---|---|
| Background | #f7fafdghostwhite | #05080bblack |
| Foreground | #000000black | #ffffffwhite |
| Card | #f3f8fbaliceblue | #060b0eblack |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #f3f8fbaliceblue | #060b0eblack |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #606466dimgray | #606466dimgray |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #666360dimgray | #666360dimgray |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #f1ece9linen | #16110eblack |
| Muted foreground | #473e38darkslategray | #c7beb8silver |
| Accent | #666360dimgray | #666360dimgray |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #c21e0ffirebrick | #f04c3dtomato |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #606466dimgray | #606466dimgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.10:1 | AAA |
| Text on card | 19.66:1 | AAA |
| Primary button | 5.96:1 | AA |
| Secondary button | 5.96:1 | AA |
| Muted text | 8.91:1 | AAA |
| Accent | 5.96:1 | AA |
| Destructive | 6.00:1 | AA |
| Text on background | 20.06:1 | AAA |
| Text on card | 19.76:1 | AAA |
| Primary button | 5.96:1 | AA |
| Secondary button | 5.96:1 | AA |
| Muted text | 10.25:1 | AAA |
| Accent | 5.96:1 | AA |
| Destructive | 3.61:1 | AA Large |
Paste this into your globals.css to use Electric in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.985 0.005 236.502);
--foreground: oklch(0 0 0);
--muted: oklch(0.947 0.006 56.342);
--muted-foreground: oklch(0.372 0.016 55.827);
--popover: oklch(0.977 0.007 236.536);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.977 0.007 236.536);
--card-foreground: oklch(0 0 0);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.501 0.006 236.604);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.502 0.006 56.271);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.502 0.006 56.271);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.523 0.199 30.09);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.501 0.006 236.604);
--chart-1: oklch(0.501 0.006 236.604);
--chart-2: oklch(0.502 0.006 56.271);
--chart-3: oklch(0.502 0.006 56.271);
--chart-4: oklch(0.529 0.006 56.27);
--chart-5: oklch(0.501 0.012 236.779);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.132 0.01 231.348);
--foreground: oklch(1 0 180);
--muted: oklch(0.183 0.01 55.707);
--muted-foreground: oklch(0.806 0.013 56.203);
--popover: oklch(0.145 0.012 234.765);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.145 0.012 234.765);
--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.501 0.006 236.604);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.502 0.006 56.271);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.502 0.006 56.271);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.646 0.204 29.081);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.501 0.006 236.604);
--chart-1: oklch(0.501 0.006 236.604);
--chart-2: oklch(0.502 0.006 56.271);
--chart-3: oklch(0.502 0.006 56.271);
--chart-4: oklch(0.529 0.006 56.27);
--chart-5: oklch(0.501 0.012 236.779);
}