Locality is a shadcn/ui theme built around a green primary color (#4de66b) with purple accents (#e64dc7). The light mode uses a neutral background (#fbfefc). Dark mode keeps the green primary (#4de66b) on a green-tinted background (#050a06).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfefcwhite | #050a06black |
| Foreground | #020803black | #f4faf6whitesmoke |
| Card | #f7fcf8mintcream | #070d08black |
| Card foreground | #010402black | #f8fcf9mintcream |
| Popover | #f7fcf8mintcream | #070d08black |
| Popover foreground | #010402black | #f8fcf9mintcream |
| Primary | #4de66bmediumseagreen | #4de66bmediumseagreen |
| Primary foreground | #000000black | #000000black |
| Secondary | #e64dc7orchid | #e64dc7orchid |
| Secondary foreground | #000000black | #000000black |
| Muted | #e5e1e4gainsboro | #1e1a1dblack |
| Muted foreground | #4b444adarkslategray | #bbb4basilver |
| Accent | #e64dc7orchid | #e64dc7orchid |
| Accent foreground | #000000black | #000000black |
| Destructive | #61230amaroon | #ec7546coral |
| Destructive foreground | #f6bea7lightpink | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #4de66bmediumseagreen | #4de66bmediumseagreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.87:1 | AAA |
| Text on card | 19.91:1 | AAA |
| Primary button | 12.78:1 | AAA |
| Secondary button | 6.21:1 | AA |
| Muted text | 7.28:1 | AAA |
| Accent | 6.21:1 | AA |
| Destructive | 7.34:1 | AAA |
| Text on background | 18.85:1 | AAA |
| Text on card | 18.92:1 | AAA |
| Primary button | 12.78:1 | AAA |
| Secondary button | 6.21:1 | AA |
| Muted text | 8.47:1 | AAA |
| Accent | 6.21:1 | AA |
| Destructive | 7.19:1 | AAA |
Paste this into your globals.css to use Locality in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.004 151.951);
--foreground: oklch(0.124 0.024 150.994);
--muted: oklch(0.914 0.006 332.103);
--muted-foreground: oklch(0.395 0.013 332.5);
--popover: oklch(0.987 0.007 151.895);
--popover-foreground: oklch(0.098 0.019 150.994);
--card: oklch(0.987 0.007 151.895);
--card-foreground: oklch(0.098 0.019 150.994);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.817 0.209 146.852);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.669 0.228 336.815);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.669 0.228 336.815);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.345 0.097 39.884);
--destructive-foreground: oklch(0.845 0.072 42.583);
--ring: oklch(0.817 0.209 146.852);
--chart-1: oklch(0.817 0.209 146.852);
--chart-2: oklch(0.669 0.228 336.815);
--chart-3: oklch(0.669 0.228 336.815);
--chart-4: oklch(0.687 0.214 336.335);
--chart-5: oklch(0.823 0.215 146.679);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.137 0.013 151.54);
--foreground: oklch(0.98 0.009 151.87);
--muted: oklch(0.224 0.008 332.558);
--muted-foreground: oklch(0.778 0.011 332.22);
--popover: oklch(0.151 0.015 151.157);
--popover-foreground: oklch(0.987 0.006 151.916);
--card: oklch(0.151 0.015 151.157);
--card-foreground: oklch(0.987 0.006 151.916);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.817 0.209 146.852);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.669 0.228 336.815);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.669 0.228 336.815);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.693 0.159 41.347);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.817 0.209 146.852);
--chart-1: oklch(0.817 0.209 146.852);
--chart-2: oklch(0.669 0.228 336.815);
--chart-3: oklch(0.669 0.228 336.815);
--chart-4: oklch(0.687 0.214 336.335);
--chart-5: oklch(0.823 0.215 146.679);
}