Hefty for shadcn/ui

Hefty is a shadcn/ui theme built around a vivid green primary color (#0d9b1c) with muted green accents (#b2cdb5). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid green primary (#0d9b1c) on a neutral background (#020302).

Color palette

TokenLightDark
Background
#ffffffwhite
#020302black
Foreground
#041005black
#f8fbf9mintcream
Card
#ffffffwhite
#020302black
Card foreground
#041005black
#f8fbf9mintcream
Popover
#ffffffwhite
#020302black
Popover foreground
#041005black
#f8fbf9mintcream
Primary
#0d9b1cforestgreen
#0d9b1cforestgreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#cbd8cclightgrey
#262c26darkslategray
Secondary foreground
#304032darkslategray
#bdc7besilver
Muted
#eff1efwhitesmoke
#0e100fblack
Muted foreground
#465348darkslategray
#acb9aedarkgray
Accent
#b2cdb5silver
#354636darkslategray
Accent foreground
#1e2e20darkslategray
#d0dcd2lightgrey
Destructive
#a52a09firebrick
#f34a1borangered
Destructive foreground
#fde8e2mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0d9b1cforestgreen
#0d9b1cforestgreen

Contrast

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

Light mode
Text on background19.41:1AAA
Text on card19.41:1AAA
Primary button3.67:1AA Large
Secondary button7.44:1AAA
Muted text7.11:1AAA
Accent8.35:1AAA
Destructive6.06:1AA
Dark mode
Text on background19.80:1AAA
Text on card19.80:1AAA
Primary button3.67:1AA Large
Secondary button8.21:1AAA
Muted text9.35:1AAA
Accent7.16:1AAA
Destructive3.61:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.158 0.032 146.839);
  --muted: oklch(0.955 0.003 148.559);
  --muted-foreground: oklch(0.427 0.024 147.954);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.158 0.032 146.839);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.158 0.032 146.839);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.599 0.194 143.392);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.868 0.021 148.321);
  --secondary-foreground: oklch(0.353 0.032 147.536);
  --accent: oklch(0.821 0.044 147.977);
  --accent-foreground: oklch(0.283 0.034 147.149);
  --destructive: oklch(0.478 0.163 34.538);
  --destructive-foreground: oklch(0.946 0.025 35.95);
  --ring: oklch(0.599 0.194 143.392);
  --chart-1: oklch(0.599 0.194 143.392);
  --chart-2: oklch(0.868 0.021 148.321);
  --chart-3: oklch(0.821 0.044 147.977);
  --chart-4: oklch(0.89 0.017 148.374);
  --chart-5: oklch(0.606 0.198 143.297);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.095 0.01 147.898);
  --foreground: oklch(0.986 0.005 148.537);
  --muted: oklch(0.171 0.004 148.298);
  --muted-foreground: oklch(0.772 0.021 148.293);
  --popover: oklch(0.095 0.01 147.898);
  --popover-foreground: oklch(0.986 0.005 148.537);
  --card: oklch(0.095 0.01 147.898);
  --card-foreground: oklch(0.986 0.005 148.537);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.599 0.194 143.392);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.285 0.014 148.03);
  --secondary-foreground: oklch(0.819 0.016 148.371);
  --accent: oklch(0.373 0.034 147.518);
  --accent-foreground: oklch(0.883 0.019 148.357);
  --destructive: oklch(0.646 0.213 35.055);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.599 0.194 143.392);
  --chart-1: oklch(0.599 0.194 143.392);
  --chart-2: oklch(0.285 0.014 148.03);
  --chart-3: oklch(0.373 0.034 147.518);
  --chart-4: oklch(0.316 0.016 148.007);
  --chart-5: oklch(0.606 0.198 143.297);
}