Urban for shadcn/ui

Urban is a shadcn/ui theme built around a muted deep green primary color (#333527) with muted light green accents (#dfe1d6). The light mode uses a neutral background (#fbfcf8). Dark mode keeps the muted deep green primary (#333527) on a neutral background (#040401).

Color palette

TokenLightDark
Background
#fbfcf8snow
#040401black
Foreground
#0b0c03black
#f8f9f6whitesmoke
Card
#fbfcf8snow
#040401black
Card foreground
#0b0c03black
#f8f9f6whitesmoke
Popover
#fbfcf8snow
#040401black
Popover foreground
#0b0c03black
#f8f9f6whitesmoke
Primary
#333527darkslategray
#333527darkslategray
Primary foreground
#cdd0besilver
#cdd0besilver
Secondary
#dfe1d6gainsboro
#171717black
Secondary foreground
#4a4d38darkolivegreen
#b0b0b0darkgray
Muted
#eff0eblinen
#140f0fblack
Muted foreground
#515440darkolivegreen
#bfababdarkgray
Accent
#dfe1d6gainsboro
#171717black
Accent foreground
#4a4d38darkolivegreen
#b0b0b0darkgray
Destructive
#77240dsaddlebrown
#e8552cchocolate
Destructive foreground
#f8cbbfpeachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#333527darkslategray
#333527darkslategray

Contrast

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

Light mode
Text on background19.06:1AAA
Text on card19.06:1AAA
Primary button7.93:1AAA
Secondary button6.59:1AA
Muted text6.79:1AA
Accent6.59:1AA
Destructive6.96:1AA
Dark mode
Text on background19.43:1AAA
Text on card19.43:1AAA
Primary button7.93:1AAA
Secondary button8.27:1AAA
Muted text8.69:1AAA
Accent8.27:1AAA
Destructive3.66:1AA Large

CSS variables

Paste this into your globals.css to use Urban in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.005 113.4);
  --foreground: oklch(0.151 0.023 114.797);
  --muted: oklch(0.952 0.007 113.437);
  --muted-foreground: oklch(0.438 0.033 114.699);
  --popover: oklch(0.989 0.005 113.4);
  --popover-foreground: oklch(0.151 0.023 114.797);
  --card: oklch(0.989 0.005 113.4);
  --card-foreground: oklch(0.151 0.023 114.797);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.323 0.025 114.75);
  --primary-foreground: oklch(0.85 0.025 113.843);
  --secondary: oklch(0.905 0.015 113.624);
  --secondary-foreground: oklch(0.411 0.034 114.848);
  --accent: oklch(0.905 0.015 113.624);
  --accent-foreground: oklch(0.411 0.034 114.848);
  --destructive: oklch(0.388 0.121 35.587);
  --destructive-foreground: oklch(0.878 0.054 35.96);
  --ring: oklch(0.323 0.025 114.75);
  --chart-1: oklch(0.323 0.025 114.75);
  --chart-2: oklch(0.905 0.015 113.624);
  --chart-3: oklch(0.905 0.015 113.624);
  --chart-4: oklch(0.926 0.012 113.549);
  --chart-5: oklch(0.327 0.029 114.985);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.103 0.015 114.258);
  --foreground: oklch(0.98 0.003 113.372);
  --muted: oklch(0.176 0.008 17.981);
  --muted-foreground: oklch(0.758 0.024 17.695);
  --popover: oklch(0.103 0.015 114.258);
  --popover-foreground: oklch(0.98 0.003 113.372);
  --card: oklch(0.103 0.015 114.258);
  --card-foreground: oklch(0.98 0.003 113.372);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.323 0.025 114.75);
  --primary-foreground: oklch(0.85 0.025 113.843);
  --secondary: oklch(0.204 0 180);
  --secondary-foreground: oklch(0.757 0 180);
  --accent: oklch(0.204 0 180);
  --accent-foreground: oklch(0.757 0 180);
  --destructive: oklch(0.64 0.19 35.868);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.323 0.025 114.75);
  --chart-1: oklch(0.323 0.025 114.75);
  --chart-2: oklch(0.204 0 180);
  --chart-3: oklch(0.204 0 180);
  --chart-4: oklch(0.238 0 161.565);
  --chart-5: oklch(0.327 0.029 114.985);
}