Magnet is a shadcn/ui theme built around a deep green primary color (#09160c) with deep orange accents (#160c09). The light mode uses a neutral background (#f7fdf8). Dark mode keeps the deep green primary (#09160c) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #f7fdf8mintcream | #000000black |
| Foreground | #051509black | #f6f8f7whitesmoke |
| Card | #f2fcf5honeydew | #030303black |
| Card foreground | #041107black | #f9fbfamintcream |
| Popover | #f2fcf5honeydew | #030303black |
| Popover foreground | #041107black | #f9fbfamintcream |
| Primary | #09160cblack | #09160cblack |
| Primary foreground | #42a95dmediumseagreen | #42a95dmediumseagreen |
| Secondary | #0c0916black | #0c0916black |
| Secondary foreground | #9682cemediumpurple | #9682cemediumpurple |
| Muted | #e3e1eagainsboro | #17151eblack |
| Muted foreground | #4b4a4fdarkslategray | #b1b0b5darkgray |
| Accent | #160c09black | #160c09black |
| Accent foreground | #ce9682rosybrown | #ce9682rosybrown |
| Destructive | #822e0dsaddlebrown | #ed7545coral |
| Destructive foreground | #f9d6c7bisque | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #09160cblack | #09160cblack |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.23:1 | AAA |
| Text on card | 18.44:1 | AAA |
| Primary button | 6.24:1 | AA |
| Secondary button | 5.99:1 | AA |
| Muted text | 6.78:1 | AA |
| Accent | 7.61:1 | AAA |
| Destructive | 6.59:1 | AA |
| Text on background | 19.68:1 | AAA |
| Text on card | 19.89:1 | AAA |
| Primary button | 6.24:1 | AA |
| Secondary button | 5.99:1 | AA |
| Muted text | 8.38:1 | AAA |
| Accent | 7.61:1 | AAA |
| Destructive | 7.20:1 | AAA |
Paste this into your globals.css to use Magnet in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.988 0.01 154.355);
--foreground: oklch(0.175 0.033 151.76);
--muted: oklch(0.914 0.013 298.325);
--muted-foreground: oklch(0.413 0.008 298.24);
--popover: oklch(0.983 0.014 154.267);
--popover-foreground: oklch(0.159 0.029 152.791);
--card: oklch(0.983 0.014 154.267);
--card-foreground: oklch(0.159 0.029 152.791);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.184 0.028 151.527);
--primary-foreground: oklch(0.656 0.146 149.351);
--secondary: oklch(0.15 0.029 295.136);
--secondary-foreground: oklch(0.656 0.113 295.375);
--accent: oklch(0.168 0.019 41.155);
--accent-foreground: oklch(0.723 0.074 40.843);
--destructive: oklch(0.42 0.123 39.315);
--destructive-foreground: oklch(0.901 0.045 42.762);
--ring: oklch(0.184 0.028 151.527);
--chart-1: oklch(0.184 0.028 151.527);
--chart-2: oklch(0.15 0.029 295.136);
--chart-3: oklch(0.168 0.019 41.155);
--chart-4: oklch(0.177 0.041 294.116);
--chart-5: oklch(0.185 0.03 151.385);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.978 0.003 154.472);
--muted: oklch(0.203 0.018 296.949);
--muted-foreground: oklch(0.76 0.007 298.415);
--popover: oklch(0.092 0 180);
--popover-foreground: oklch(0.986 0.002 154.491);
--card: oklch(0.092 0 180);
--card-foreground: oklch(0.986 0.002 154.491);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.184 0.028 151.527);
--primary-foreground: oklch(0.656 0.146 149.351);
--secondary: oklch(0.15 0.029 295.136);
--secondary-foreground: oklch(0.656 0.113 295.375);
--accent: oklch(0.168 0.019 41.155);
--accent-foreground: oklch(0.723 0.074 40.843);
--destructive: oklch(0.693 0.161 41.301);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.184 0.028 151.527);
--chart-1: oklch(0.184 0.028 151.527);
--chart-2: oklch(0.15 0.029 295.136);
--chart-3: oklch(0.168 0.019 41.155);
--chart-4: oklch(0.177 0.041 294.116);
--chart-5: oklch(0.185 0.03 151.385);
}