Rusty for shadcn/ui

Rusty is a shadcn/ui theme built around a deep green primary color (#2f6537) with deep teal accents (#2f6552). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep green primary (#2f6537) on a neutral background (#010402).

Color palette

TokenLightDark
Background
#ffffffwhite
#010402black
Foreground
#000000black
#fcfdfcwhite
Card
#fcfcfcsnow
#020803black
Card foreground
#000000black
#ffffffwhite
Popover
#ffffffwhite
#010402black
Popover foreground
#000000black
#fcfdfcwhite
Primary
#2f6537darkslategray
#2f6537darkslategray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#42652fdarkolivegreen
#42652fdarkolivegreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f1f7eewhitesmoke
#0b1108black
Muted foreground
#434c3edarkslategray
#b8c1b3silver
Accent
#2f6552darkslategray
#2f6552darkslategray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#cf2907firebrick
#f74926orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2f6537darkslategray
#2f6537darkslategray

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button6.94:1AA
Secondary button6.73:1AA
Muted text8.22:1AAA
Accent6.79:1AA
Destructive5.30:1AA
Dark mode
Text on background20.20:1AAA
Text on card20.21:1AAA
Primary button6.94:1AA
Secondary button6.73:1AA
Muted text10.27:1AAA
Accent6.79:1AA
Destructive3.53:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.969 0.014 134.301);
  --muted-foreground: oklch(0.403 0.025 134.587);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.456 0.092 147.091);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.465 0.09 135.662);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.463 0.065 168.259);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.553 0.204 32.174);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.456 0.092 147.091);
  --chart-1: oklch(0.456 0.092 147.091);
  --chart-2: oklch(0.465 0.09 135.662);
  --chart-3: oklch(0.463 0.065 168.259);
  --chart-4: oklch(0.498 0.097 135.687);
  --chart-5: oklch(0.461 0.099 146.853);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.097 0.017 149.166);
  --foreground: oklch(0.993 0.001 150.227);
  --muted: oklch(0.17 0.021 134.755);
  --muted-foreground: oklch(0.8 0.021 134.372);
  --popover: oklch(0.097 0.017 149.166);
  --popover-foreground: oklch(0.993 0.001 150.227);
  --card: oklch(0.123 0.021 149.166);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.456 0.092 147.091);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.465 0.09 135.662);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.463 0.065 168.259);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.652 0.216 33.071);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.456 0.092 147.091);
  --chart-1: oklch(0.456 0.092 147.091);
  --chart-2: oklch(0.465 0.09 135.662);
  --chart-3: oklch(0.463 0.065 168.259);
  --chart-4: oklch(0.498 0.097 135.687);
  --chart-5: oklch(0.461 0.099 146.853);
}