Hearty for shadcn/ui

Hearty is a shadcn/ui theme built around a muted deep green primary color (#0b130c) with muted light green accents (#e7eee7). The light mode uses a neutral background (#fbfefb). Dark mode keeps the muted deep green primary (#0b130c) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfefbwhite
#000000black
Foreground
#031703black
#fcfdfcwhite
Card
#fbfefbwhite
#000000black
Card foreground
#031703black
#fcfdfcwhite
Popover
#fbfefbwhite
#000000black
Popover foreground
#031703black
#fcfdfcwhite
Primary
#0b130cblack
#0b130cblack
Primary foreground
#92bf93darkseagreen
#92bf93darkseagreen
Secondary
#e7eee7beige
#2f322fdarkslategray
Secondary foreground
#19241ablack
#c7ccc7silver
Muted
#cee3cflightgrey
#1c311ddarkslategray
Muted foreground
#556256dimgray
#9daa9ddarkgray
Accent
#e7eee7beige
#2f322fdarkslategray
Accent foreground
#19241ablack
#c7ccc7silver
Destructive
#ac1b02firebrick
#fd5335tomato
Destructive foreground
#ffe5e1mistyrose
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0b130cblack
#0b130cblack

Contrast

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

Light mode
Text on background18.29:1AAA
Text on card18.29:1AAA
Primary button9.05:1AAA
Secondary button13.60:1AAA
Muted text4.75:1AA
Accent13.60:1AAA
Destructive6.03:1AA
Dark mode
Text on background20.59:1AAA
Text on card20.59:1AAA
Primary button9.05:1AAA
Secondary button7.94:1AAA
Muted text5.78:1AA
Accent7.94:1AAA
Destructive6.46:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.004 146.509);
  --foreground: oklch(0.18 0.05 144.018);
  --muted: oklch(0.895 0.035 146.196);
  --muted-foreground: oklch(0.482 0.025 146.073);
  --popover: oklch(0.993 0.004 146.509);
  --popover-foreground: oklch(0.18 0.05 144.018);
  --card: oklch(0.993 0.004 146.509);
  --card-foreground: oklch(0.18 0.05 144.018);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.177 0.02 145.505);
  --primary-foreground: oklch(0.76 0.078 145.595);
  --secondary: oklch(0.942 0.012 146.434);
  --secondary-foreground: oklch(0.246 0.024 145.648);
  --accent: oklch(0.942 0.012 146.434);
  --accent-foreground: oklch(0.246 0.024 145.648);
  --destructive: oklch(0.478 0.181 31.753);
  --destructive-foreground: oklch(0.942 0.029 29.602);
  --ring: oklch(0.177 0.02 145.505);
  --chart-1: oklch(0.177 0.02 145.505);
  --chart-2: oklch(0.942 0.012 146.434);
  --chart-3: oklch(0.942 0.012 146.434);
  --chart-4: oklch(0.964 0.007 146.476);
  --chart-5: oklch(0.178 0.022 145.389);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.993 0.002 146.525);
  --muted: oklch(0.287 0.045 145.057);
  --muted-foreground: oklch(0.723 0.023 146.262);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.993 0.002 146.525);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.993 0.002 146.525);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.177 0.02 145.505);
  --primary-foreground: oklch(0.76 0.078 145.595);
  --secondary: oklch(0.314 0.008 146.302);
  --secondary-foreground: oklch(0.839 0.007 146.465);
  --accent: oklch(0.314 0.008 146.302);
  --accent-foreground: oklch(0.839 0.007 146.465);
  --destructive: oklch(0.673 0.211 32.374);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.177 0.02 145.505);
  --chart-1: oklch(0.177 0.02 145.505);
  --chart-2: oklch(0.314 0.008 146.302);
  --chart-3: oklch(0.314 0.008 146.302);
  --chart-4: oklch(0.344 0.01 146.295);
  --chart-5: oklch(0.178 0.022 145.389);
}