Urban for shadcn/ui

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).

Color palette

TokenLightDark
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

Contrast

WCAG 2 contrast ratios between each background and its foreground color.

Light mode
Text on background19.71:1AAA
Text on card19.64:1AAA
Primary button7.90:1AAA
Secondary button8.00:1AAA
Muted text6.80:1AA
Accent8.00:1AAA
Destructive5.97:1AA
Dark mode
Text on background18.57:1AAA
Text on card18.39:1AAA
Primary button7.90:1AAA
Secondary button8.00:1AAA
Muted text7.14:1AAA
Accent8.00:1AAA
Destructive4.73:1AA

CSS variables

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);
}