Urban is a shadcn/ui theme built around a neutral gray primary color (#33332e) with neutral gray accents (#2e2e33). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#33332e) on a yellow-tinted background (#0f0f05).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #0f0f05black |
| Foreground | #0c0b04black | #fbfbf9snow |
| Card | #fcfcfcsnow | #131306black |
| Card foreground | #080802black | #fdfdfcwhite |
| Popover | #ffffffwhite | #0f0f05black |
| Popover foreground | #0c0b04black | #fbfbf9snow |
| Primary | #33332edarkslategray | #33332edarkslategray |
| Primary foreground | #ccccc7lightgrey | #ccccc7lightgrey |
| Secondary | #2e2e33darkslategray | #2e2e33darkslategray |
| Secondary foreground | #c7c7ccsilver | #c7c7ccsilver |
| Muted | #dedee8gainsboro | #171821black |
| Muted foreground | #46475ddarkslategray | #a2a3b9darkgray |
| Accent | #2e2e33darkslategray | #2e2e33darkslategray |
| Accent foreground | #c7c7ccsilver | #c7c7ccsilver |
| Destructive | #c80e04firebrick | #e61005red |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #33332edarkslategray | #33332edarkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.71:1 | AAA |
| Text on card | 19.64:1 | AAA |
| Primary button | 7.90:1 | AAA |
| Secondary button | 8.00:1 | AAA |
| Muted text | 6.80:1 | AA |
| Accent | 8.00:1 | AAA |
| Destructive | 5.97:1 | AA |
| Text on background | 18.57:1 | AAA |
| Text on card | 18.39:1 | AAA |
| Primary button | 7.90:1 | AAA |
| Secondary button | 8.00:1 | AAA |
| Muted text | 7.14:1 | AAA |
| Accent | 8.00:1 | AAA |
| Destructive | 4.73:1 | AA |
Paste this into your globals.css to use Urban in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.149 0.019 107.12);
--muted: oklch(0.905 0.012 284.562);
--muted-foreground: oklch(0.406 0.037 283.077);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.149 0.019 107.12);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.13 0.017 107.221);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.318 0.008 105.246);
--primary-foreground: oklch(0.844 0.007 104.954);
--secondary: oklch(0.304 0.008 284.312);
--secondary-foreground: oklch(0.831 0.007 284.655);
--accent: oklch(0.304 0.008 284.312);
--accent-foreground: oklch(0.831 0.007 284.655);
--destructive: oklch(0.527 0.211 29.602);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.318 0.008 105.246);
--chart-1: oklch(0.318 0.008 105.246);
--chart-2: oklch(0.304 0.008 284.312);
--chart-3: oklch(0.304 0.008 284.312);
--chart-4: oklch(0.333 0.009 284.295);
--chart-5: oklch(0.323 0.013 105.483);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.165 0.021 106.894);
--foreground: oklch(0.986 0.002 104.84);
--muted: oklch(0.211 0.018 283.181);
--muted-foreground: oklch(0.721 0.032 284.001);
--popover: oklch(0.165 0.021 106.894);
--popover-foreground: oklch(0.986 0.002 104.84);
--card: oklch(0.182 0.024 106.868);
--card-foreground: oklch(0.993 0.001 104.824);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.318 0.008 105.246);
--primary-foreground: oklch(0.844 0.007 104.954);
--secondary: oklch(0.304 0.008 284.312);
--secondary-foreground: oklch(0.831 0.007 284.655);
--accent: oklch(0.304 0.008 284.312);
--accent-foreground: oklch(0.831 0.007 284.655);
--destructive: oklch(0.584 0.235 29.563);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.318 0.008 105.246);
--chart-1: oklch(0.318 0.008 105.246);
--chart-2: oklch(0.304 0.008 284.312);
--chart-3: oklch(0.304 0.008 284.312);
--chart-4: oklch(0.333 0.009 284.295);
--chart-5: oklch(0.323 0.013 105.483);
}