Heartbeat for shadcn/ui

Heartbeat is a shadcn/ui theme built around a deep green primary color (#061408) with deep teal accents (#06140f). The light mode uses a neutral background (#f8fcf9). Dark mode keeps the deep green primary (#061408) on a neutral background (#020302).

Color palette

TokenLightDark
Background
#f8fcf9mintcream
#020302black
Foreground
#041006black
#f6f9f6whitesmoke
Card
#f5faf6whitesmoke
#040704black
Card foreground
#030c05black
#f9fbf9mintcream
Popover
#f8fcf9mintcream
#020302black
Popover foreground
#041006black
#f6f9f6whitesmoke
Primary
#061408black
#061408black
Primary foreground
#36b04alimegreen
#36b04alimegreen
Secondary
#0a1406black
#0a1406black
Secondary foreground
#5eb036olivedrab
#5eb036olivedrab
Muted
#e6efe1beige
#151e10black
Muted foreground
#414540darkslategray
#bcbfbasilver
Accent
#06140fblack
#06140fblack
Accent foreground
#36b087mediumseagreen
#36b087mediumseagreen
Destructive
#852d05saddlebrown
#ec5109orangered
Destructive foreground
#fdd3bfpeachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#061408black
#061408black

Contrast

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

Light mode
Text on background18.70:1AAA
Text on card18.76:1AAA
Primary button6.73:1AA
Secondary button6.95:1AA
Muted text8.27:1AAA
Accent6.94:1AA
Destructive6.41:1AA
Dark mode
Text on background19.45:1AAA
Text on card19.50:1AAA
Primary button6.73:1AA
Secondary button6.95:1AA
Muted text9.24:1AAA
Accent6.94:1AA
Destructive3.65:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.005 150.748);
  --foreground: oklch(0.158 0.029 149.195);
  --muted: oklch(0.941 0.021 134.937);
  --muted-foreground: oklch(0.385 0.01 134.957);
  --popover: oklch(0.987 0.005 150.748);
  --popover-foreground: oklch(0.158 0.029 149.195);
  --card: oklch(0.98 0.008 150.71);
  --card-foreground: oklch(0.141 0.025 149.696);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.172 0.031 148.719);
  --primary-foreground: oklch(0.667 0.177 145.962);
  --secondary: oklch(0.175 0.031 135.112);
  --secondary-foreground: oklch(0.679 0.175 137.086);
  --accent: oklch(0.174 0.022 170.864);
  --accent-foreground: oklch(0.679 0.123 166.477);
  --destructive: oklch(0.424 0.128 40.269);
  --destructive-foreground: oklch(0.896 0.054 46.268);
  --ring: oklch(0.172 0.031 148.719);
  --chart-1: oklch(0.172 0.031 148.719);
  --chart-2: oklch(0.175 0.031 135.112);
  --chart-3: oklch(0.174 0.022 170.864);
  --chart-4: oklch(0.22 0.044 136.194);
  --chart-5: oklch(0.173 0.032 148.635);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.095 0.009 150.285);
  --foreground: oklch(0.978 0.004 150.766);
  --muted: oklch(0.221 0.029 135.586);
  --muted-foreground: oklch(0.801 0.008 134.878);
  --popover: oklch(0.095 0.009 150.285);
  --popover-foreground: oklch(0.978 0.004 150.766);
  --card: oklch(0.119 0.011 150.285);
  --card-foreground: oklch(0.986 0.003 150.784);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.172 0.031 148.719);
  --primary-foreground: oklch(0.667 0.177 145.962);
  --secondary: oklch(0.175 0.031 135.112);
  --secondary-foreground: oklch(0.679 0.175 137.086);
  --accent: oklch(0.174 0.022 170.864);
  --accent-foreground: oklch(0.679 0.123 166.477);
  --destructive: oklch(0.641 0.203 38.944);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.172 0.031 148.719);
  --chart-1: oklch(0.172 0.031 148.719);
  --chart-2: oklch(0.175 0.031 135.112);
  --chart-3: oklch(0.174 0.022 170.864);
  --chart-4: oklch(0.22 0.044 136.194);
  --chart-5: oklch(0.173 0.032 148.635);
}