Suburb for shadcn/ui

Suburb is a shadcn/ui theme built around a vivid deep green primary color (#057a30) with vivid deep teal accents (#057a6b). The light mode uses a neutral background (#fbfefc). Dark mode keeps the vivid deep green primary (#057a30) on a neutral background (#020302).

Color palette

TokenLightDark
Background
#fbfefcwhite
#020302black
Foreground
#031108black
#f9fafaghostwhite
Card
#fbfefcwhite
#020302black
Card foreground
#031108black
#f9fafaghostwhite
Popover
#fbfefcwhite
#020302black
Popover foreground
#031108black
#f9fafaghostwhite
Primary
#057a30forestgreen
#057a30forestgreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#157a05green
#157a05green
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#eff0efwhitesmoke
#0f100fblack
Muted foreground
#515251darkslategray
#adaeaddarkgray
Accent
#057a6bteal
#057a6bteal
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#681208maroon
#e22712orangered
Destructive foreground
#f8b2aalightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#057a30forestgreen
#057a30forestgreen

Contrast

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

Light mode
Text on background19.03:1AAA
Text on card19.03:1AAA
Primary button5.45:1AA
Secondary button5.47:1AA
Muted text6.89:1AA
Accent5.22:1AA
Destructive7.12:1AAA
Dark mode
Text on background19.72:1AAA
Text on card19.72:1AAA
Primary button5.45:1AA
Secondary button5.47:1AA
Muted text8.56:1AAA
Accent5.22:1AA
Destructive4.61:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.005 158.617);
  --foreground: oklch(0.161 0.029 156.723);
  --muted: oklch(0.955 0.002 141.585);
  --muted-foreground: oklch(0.438 0.003 141.572);
  --popover: oklch(0.994 0.005 158.617);
  --popover-foreground: oklch(0.161 0.029 156.723);
  --card: oklch(0.994 0.005 158.617);
  --card-foreground: oklch(0.161 0.029 156.723);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.507 0.144 148.158);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.506 0.166 141.663);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.521 0.094 179.612);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.338 0.121 30.49);
  --destructive-foreground: oklch(0.827 0.083 26.126);
  --ring: oklch(0.507 0.144 148.158);
  --chart-1: oklch(0.507 0.144 148.158);
  --chart-2: oklch(0.506 0.166 141.663);
  --chart-3: oklch(0.521 0.094 179.612);
  --chart-4: oklch(0.549 0.181 141.714);
  --chart-5: oklch(0.513 0.148 147.93);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.095 0.008 158.584);
  --foreground: oklch(0.985 0.002 158.686);
  --muted: oklch(0.171 0.004 141.53);
  --muted-foreground: oklch(0.75 0.003 141.582);
  --popover: oklch(0.095 0.008 158.584);
  --popover-foreground: oklch(0.985 0.002 158.686);
  --card: oklch(0.095 0.008 158.584);
  --card-foreground: oklch(0.985 0.002 158.686);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.507 0.144 148.158);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.506 0.166 141.663);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.521 0.094 179.612);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.588 0.222 30.505);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.507 0.144 148.158);
  --chart-1: oklch(0.507 0.144 148.158);
  --chart-2: oklch(0.506 0.166 141.663);
  --chart-3: oklch(0.521 0.094 179.612);
  --chart-4: oklch(0.549 0.181 141.714);
  --chart-5: oklch(0.513 0.148 147.93);
}