Spear is a shadcn/ui theme built around a green primary color (#d0eb7f) with purple accents (#eb7fd0). The light mode uses a neutral background (#fdfefb). Dark mode keeps the green primary (#d0eb7f) on a green-tinted background (#0d0f06).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfefbwhite | #0d0f06black |
| Foreground | #070902black | #fdfdfcwhite |
| Card | #fdfefbwhite | #0d0f06black |
| Card foreground | #070902black | #fdfdfcwhite |
| Popover | #fdfefbwhite | #0d0f06black |
| Popover foreground | #070902black | #fdfdfcwhite |
| Primary | #d0eb7fkhaki | #d0eb7fkhaki |
| Primary foreground | #263108black | #263108black |
| Secondary | #7fd0ebskyblue | #7fd0ebskyblue |
| Secondary foreground | #082631black | #082631black |
| Muted | #e0e4e6gainsboro | #191d1fblack |
| Muted foreground | #5c6366dimgray | #99a1a3darkgray |
| Accent | #eb7fd0orchid | #eb7fd0orchid |
| Accent foreground | #310826black | #310826black |
| Destructive | #be2713firebrick | #da2d16firebrick |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #d0eb7fkhaki | #d0eb7fkhaki |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.77:1 | AAA |
| Text on card | 19.77:1 | AAA |
| Primary button | 10.40:1 | AAA |
| Secondary button | 9.10:1 | AAA |
| Muted text | 4.79:1 | AA |
| Accent | 7.10:1 | AAA |
| Destructive | 6.01:1 | AA |
| Text on background | 18.98:1 | AAA |
| Text on card | 18.98:1 | AAA |
| Primary button | 10.40:1 | AAA |
| Secondary button | 9.10:1 | AAA |
| Muted text | 6.42:1 | AA |
| Accent | 7.10:1 | AAA |
| Destructive | 4.81:1 | AA |
Paste this into your globals.css to use Spear in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.995 0.004 117.895);
--foreground: oklch(0.132 0.023 118.057);
--muted: oklch(0.917 0.005 219.547);
--muted-foreground: oklch(0.495 0.01 219.669);
--popover: oklch(0.995 0.004 117.895);
--popover-foreground: oklch(0.132 0.023 118.057);
--card: oklch(0.995 0.004 117.895);
--card-foreground: oklch(0.132 0.023 118.057);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.897 0.137 120.769);
--primary-foreground: oklch(0.292 0.063 122.568);
--secondary: oklch(0.815 0.088 221.371);
--secondary-foreground: oklch(0.253 0.04 224.023);
--accent: oklch(0.742 0.164 337.306);
--accent-foreground: oklch(0.222 0.078 339.58);
--destructive: oklch(0.522 0.19 31.028);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.897 0.137 120.769);
--chart-1: oklch(0.897 0.137 120.769);
--chart-2: oklch(0.815 0.088 221.371);
--chart-3: oklch(0.742 0.164 337.306);
--chart-4: oklch(0.833 0.08 220.992);
--chart-5: oklch(0.903 0.142 120.873);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.162 0.02 119.311);
--foreground: oklch(0.993 0.001 117.845);
--muted: oklch(0.229 0.007 219.773);
--muted-foreground: oklch(0.702 0.009 219.607);
--popover: oklch(0.162 0.02 119.311);
--popover-foreground: oklch(0.993 0.001 117.845);
--card: oklch(0.162 0.02 119.311);
--card-foreground: oklch(0.993 0.001 117.845);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.897 0.137 120.769);
--primary-foreground: oklch(0.292 0.063 122.568);
--secondary: oklch(0.815 0.088 221.371);
--secondary-foreground: oklch(0.253 0.04 224.023);
--accent: oklch(0.742 0.164 337.306);
--accent-foreground: oklch(0.222 0.078 339.58);
--destructive: oklch(0.577 0.211 31.015);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.897 0.137 120.769);
--chart-1: oklch(0.897 0.137 120.769);
--chart-2: oklch(0.815 0.088 221.371);
--chart-3: oklch(0.742 0.164 337.306);
--chart-4: oklch(0.833 0.08 220.992);
--chart-5: oklch(0.903 0.142 120.873);
}