Hearty for shadcn/ui

Hearty is a shadcn/ui theme built around a vivid green primary color (#a0ed12) with muted light green accents (#e6e8e3). The light mode uses a neutral background (#fdfefb). Dark mode keeps the vivid green primary (#a0ed12) on a neutral background (#030401).

Color palette

TokenLightDark
Background
#fdfefbwhite
#030401black
Foreground
#0c1004black
#f8f8f7whitesmoke
Card
#fbfcf8snow
#060802black
Card foreground
#090c03black
#fafaf9snow
Popover
#fbfcf8snow
#060802black
Popover foreground
#090c03black
#fafaf9snow
Primary
#a0ed12greenyellow
#a0ed12greenyellow
Primary foreground
#202f04black
#202f04black
Secondary
#e6e8e3gainsboro
#34382edarkslategray
Secondary foreground
#4f5445darkolivegreen
#cdd1c7lightgrey
Muted
#dde0d7gainsboro
#25281fdarkslategray
Muted foreground
#626a53dimgray
#a4ac95darkgray
Accent
#e6e8e3gainsboro
#34382edarkslategray
Accent foreground
#4f5445darkolivegreen
#cdd1c7lightgrey
Destructive
#d13400orangered
#ff470aorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a0ed12greenyellow
#a0ed12greenyellow

Contrast

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

Light mode
Text on background18.96:1AAA
Text on card19.14:1AAA
Primary button9.96:1AAA
Secondary button6.33:1AA
Muted text4.23:1AA Large
Accent6.33:1AA
Destructive4.98:1AA
Dark mode
Text on background19.34:1AAA
Text on card19.27:1AAA
Primary button9.96:1AAA
Secondary button7.75:1AAA
Muted text6.33:1AA
Accent7.75:1AAA
Destructive3.40:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.003 122.265);
  --foreground: oklch(0.164 0.025 123.476);
  --muted: oklch(0.901 0.013 122.439);
  --muted-foreground: oklch(0.51 0.036 123.346);
  --popover: oklch(0.989 0.007 122.317);
  --popover-foreground: oklch(0.147 0.022 122.075);
  --card: oklch(0.989 0.007 122.317);
  --card-foreground: oklch(0.147 0.022 122.075);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.863 0.228 129.537);
  --primary-foreground: oklch(0.283 0.069 127.309);
  --secondary: oklch(0.928 0.007 122.333);
  --secondary-foreground: oklch(0.437 0.025 123.139);
  --accent: oklch(0.928 0.007 122.333);
  --accent-foreground: oklch(0.437 0.025 123.139);
  --destructive: oklch(0.566 0.199 34.851);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.863 0.228 129.537);
  --chart-1: oklch(0.863 0.228 129.537);
  --chart-2: oklch(0.928 0.007 122.333);
  --chart-3: oklch(0.928 0.007 122.333);
  --chart-4: oklch(0.95 0.005 122.295);
  --chart-5: oklch(0.873 0.232 129.771);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.102 0.015 121.776);
  --foreground: oklch(0.979 0.002 122.247);
  --muted: oklch(0.272 0.017 123.231);
  --muted-foreground: oklch(0.732 0.033 122.931);
  --popover: oklch(0.128 0.019 121.776);
  --popover-foreground: oklch(0.986 0.001 122.235);
  --card: oklch(0.128 0.019 121.776);
  --card-foreground: oklch(0.986 0.001 122.235);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.863 0.228 129.537);
  --primary-foreground: oklch(0.283 0.069 127.309);
  --secondary: oklch(0.333 0.016 122.992);
  --secondary-foreground: oklch(0.854 0.013 122.452);
  --accent: oklch(0.333 0.016 122.992);
  --accent-foreground: oklch(0.854 0.013 122.452);
  --destructive: oklch(0.663 0.227 35.303);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.863 0.228 129.537);
  --chart-1: oklch(0.863 0.228 129.537);
  --chart-2: oklch(0.333 0.016 122.992);
  --chart-3: oklch(0.333 0.016 122.992);
  --chart-4: oklch(0.364 0.018 123.014);
  --chart-5: oklch(0.873 0.232 129.771);
}