Suburban for shadcn/ui

Suburban is a shadcn/ui theme built around a green primary color (#38ad38) with teal accents (#38ad73). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#38ad38) on a green-tinted background (#030c03).

Color palette

TokenLightDark
Background
#ffffffwhite
#030c03black
Foreground
#030c03black
#f6f9f6whitesmoke
Card
#fcfcfcsnow
#041004black
Card foreground
#020802black
#f9fbf9mintcream
Popover
#fcfcfcsnow
#041004black
Popover foreground
#020802black
#f9fbf9mintcream
Primary
#38ad38limegreen
#38ad38limegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#73ad38olivedrab
#73ad38olivedrab
Secondary foreground
#0d1306black
#0d1306black
Muted
#ebede8linen
#141712black
Muted foreground
#4d5643darkolivegreen
#b3bca9darkgray
Accent
#38ad73mediumseagreen
#38ad73mediumseagreen
Accent foreground
#06130dblack
#06130dblack
Destructive
#be4b09chocolate
#e0590bchocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#38ad38limegreen
#38ad38limegreen

Contrast

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

Light mode
Text on background19.85:1AAA
Text on card19.79:1AAA
Primary button2.90:1Fail
Secondary button6.99:1AA
Muted text6.54:1AA
Accent6.69:1AA
Destructive4.99:1AA
Dark mode
Text on background18.70:1AAA
Text on card18.66:1AAA
Primary button2.90:1Fail
Secondary button6.99:1AA
Muted text9.18:1AAA
Accent6.69:1AA
Destructive3.75:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.141 0.03 143.762);
  --muted: oklch(0.944 0.008 128.557);
  --muted-foreground: oklch(0.438 0.031 129.294);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.122 0.026 143.774);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.122 0.026 143.774);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.659 0.187 143.082);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.684 0.16 132.175);
  --secondary-foreground: oklch(0.177 0.028 129.836);
  --accent: oklch(0.668 0.136 157.314);
  --accent-foreground: oklch(0.173 0.024 161.654);
  --destructive: oklch(0.56 0.162 43.164);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.659 0.187 143.082);
  --chart-1: oklch(0.659 0.187 143.082);
  --chart-2: oklch(0.684 0.16 132.175);
  --chart-3: oklch(0.668 0.136 157.314);
  --chart-4: oklch(0.718 0.168 132.201);
  --chart-5: oklch(0.667 0.195 143.002);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.029 143.857);
  --foreground: oklch(0.978 0.004 145.542);
  --muted: oklch(0.2 0.012 129.145);
  --muted-foreground: oklch(0.782 0.027 128.858);
  --popover: oklch(0.157 0.033 143.8);
  --popover-foreground: oklch(0.986 0.003 145.554);
  --card: oklch(0.157 0.033 143.8);
  --card-foreground: oklch(0.986 0.003 145.554);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.659 0.187 143.082);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.684 0.16 132.175);
  --secondary-foreground: oklch(0.177 0.028 129.836);
  --accent: oklch(0.668 0.136 157.314);
  --accent-foreground: oklch(0.173 0.024 161.654);
  --destructive: oklch(0.631 0.184 42.824);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.659 0.187 143.082);
  --chart-1: oklch(0.659 0.187 143.082);
  --chart-2: oklch(0.684 0.16 132.175);
  --chart-3: oklch(0.668 0.136 157.314);
  --chart-4: oklch(0.718 0.168 132.201);
  --chart-5: oklch(0.667 0.195 143.002);
}