Imperial Swampland for shadcn/ui

Imperial Swampland is a shadcn/ui theme built around a deep green primary color (#20602b) with blue accents (#336699). The light mode uses a neutral background (#f8fcf9). Dark mode switches to a green primary (#3d8f4b) on a blue-tinted background (#14161f).

Color palette

TokenLightDark
Background
#f8fcf9mintcream
#14161fblack
Foreground
#262626darkslategray
#f2f2f2whitesmoke
Card
#f4faf5whitesmoke
#1f212edarkslategray
Card foreground
#262626darkslategray
#f2f2f2whitesmoke
Popover
#f4faf5whitesmoke
#1f212edarkslategray
Popover foreground
#1f1f1fblack
#f2f2f2whitesmoke
Primary
#20602bdarkslategray
#3d8f4bseagreen
Primary foreground
#e0ebe2gainsboro
#f0f5f1whitesmoke
Secondary
#363d63darkslategray
#475285darkslateblue
Secondary foreground
#eef0f6whitesmoke
#eef0f6whitesmoke
Muted
#e4e7e4gainsboro
#222a24darkslategray
Muted foreground
#455445darkslategray
#acb9aedarkgray
Accent
#336699steelblue
#4d80b3steelblue
Accent foreground
#dee6edlavender
#f0f2f5whitesmoke
Destructive
#f53d3dtomato
#e61a1acrimson
Destructive foreground
#f2f2f2whitesmoke
#f2f2f2whitesmoke
Border
#c9cfc9lightgrey
#222a24darkslategray
Input
#c9cfc9lightgrey
#222a24darkslategray
Ring
#20602bdarkslategray
#3d8f4bseagreen

Contrast

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

Light mode
Text on background14.60:1AAA
Text on card14.34:1AAA
Primary button6.22:1AA
Secondary button9.17:1AAA
Muted text6.47:1AA
Accent4.75:1AA
Destructive3.34:1AA Large
Dark mode
Text on background16.09:1AAA
Text on card14.25:1AAA
Primary button3.64:1AA Large
Secondary button6.57:1AA
Muted text7.22:1AAA
Accent3.72:1AA Large
Destructive4.16:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.006 150.735);
  --foreground: oklch(0.27 0 180);
  --muted: oklch(0.925 0.006 145.526);
  --muted-foreground: oklch(0.428 0.031 145.001);
  --popover: oklch(0.98 0.009 150.691);
  --popover-foreground: oklch(0.238 0 161.565);
  --card: oklch(0.98 0.009 150.691);
  --card-foreground: oklch(0.27 0 180);
  --border: oklch(0.848 0.011 145.481);
  --input: oklch(0.848 0.011 145.481);
  --primary: oklch(0.433 0.106 146.505);
  --primary-foreground: oklch(0.929 0.016 150.588);
  --secondary: oklch(0.372 0.066 274.146);
  --secondary-foreground: oklch(0.955 0.009 277.134);
  --accent: oklch(0.499 0.099 250.433);
  --accent-foreground: oklch(0.92 0.013 247.972);
  --destructive: oklch(0.64 0.22 26.017);
  --destructive-foreground: oklch(0.962 0 180);
  --ring: oklch(0.433 0.106 146.505);
  --chart-1: oklch(0.433 0.106 146.505);
  --chart-2: oklch(0.372 0.066 274.146);
  --chart-3: oklch(0.499 0.099 250.433);
  --chart-4: oklch(0.397 0.072 274.087);
  --chart-5: oklch(0.438 0.111 146.286);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.203 0.017 275.935);
  --foreground: oklch(0.962 0 180);
  --muted: oklch(0.276 0.016 150.005);
  --muted-foreground: oklch(0.772 0.02 150.467);
  --popover: oklch(0.252 0.024 275.715);
  --popover-foreground: oklch(0.962 0 180);
  --card: oklch(0.252 0.024 275.715);
  --card-foreground: oklch(0.962 0 180);
  --border: oklch(0.276 0.016 150.005);
  --input: oklch(0.276 0.016 150.005);
  --primary: oklch(0.582 0.129 147.048);
  --primary-foreground: oklch(0.965 0.008 150.71);
  --secondary: oklch(0.452 0.084 273.978);
  --secondary-foreground: oklch(0.955 0.009 277.134);
  --accent: oklch(0.584 0.096 249.779);
  --accent-foreground: oklch(0.961 0.004 247.869);
  --destructive: oklch(0.587 0.23 28.262);
  --destructive-foreground: oklch(0.962 0 180);
  --ring: oklch(0.582 0.129 147.048);
  --chart-1: oklch(0.582 0.129 147.048);
  --chart-2: oklch(0.452 0.084 273.978);
  --chart-3: oklch(0.584 0.096 249.779);
  --chart-4: oklch(0.475 0.09 273.941);
  --chart-5: oklch(0.588 0.137 146.798);
}