Heartfelt for shadcn/ui

Heartfelt is a shadcn/ui theme built around a green primary color (#97c346) with near-white accents (#e8e8e8). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#97c346) on a neutral background (#030401).

Color palette

TokenLightDark
Background
#ffffffwhite
#030401black
Foreground
#0f1306black
#fafcf8snow
Card
#ffffffwhite
#030401black
Card foreground
#0f1306black
#fafcf8snow
Popover
#ffffffwhite
#030401black
Popover foreground
#0f1306black
#fafcf8snow
Primary
#97c346yellowgreen
#97c346yellowgreen
Primary foreground
#232e0fblack
#232e0fblack
Secondary
#e8e8e8lavender
#34372fdarkslategray
Secondary foreground
#4f4f4fdarkslategray
#cdd0c8lightgrey
Muted
#ece4e4linen
#181b13black
Muted foreground
#615656dimgray
#a5a99edarkgray
Accent
#e8e8e8lavender
#34372fdarkslategray
Accent foreground
#4f4f4fdarkslategray
#cdd0c8lightgrey
Destructive
#690a07maroon
#f23731crimson
Destructive foreground
#f9aba9lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#97c346yellowgreen
#97c346yellowgreen

Contrast

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

Light mode
Text on background18.81:1AAA
Text on card18.81:1AAA
Primary button6.95:1AA
Secondary button6.68:1AA
Muted text5.64:1AA
Accent6.68:1AA
Destructive6.91:1AA
Dark mode
Text on background19.90:1AAA
Text on card19.90:1AAA
Primary button6.95:1AA
Secondary button7.79:1AAA
Muted text7.27:1AAA
Accent7.79:1AAA
Destructive3.91:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.179 0.027 124.29);
  --muted: oklch(0.925 0.009 17.319);
  --muted-foreground: oklch(0.465 0.014 17.684);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.179 0.027 124.29);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.179 0.027 124.29);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.761 0.16 126.399);
  --primary-foreground: oklch(0.283 0.053 125.701);
  --secondary: oklch(0.931 0 180);
  --secondary-foreground: oklch(0.428 0 180);
  --accent: oklch(0.931 0 180);
  --accent-foreground: oklch(0.428 0 180);
  --destructive: oklch(0.335 0.128 28.868);
  --destructive-foreground: oklch(0.817 0.093 21.472);
  --ring: oklch(0.761 0.16 126.399);
  --chart-1: oklch(0.761 0.16 126.399);
  --chart-2: oklch(0.931 0 180);
  --chart-3: oklch(0.931 0 180);
  --chart-4: oklch(0.954 0 180);
  --chart-5: oklch(0.77 0.166 126.627);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.102 0.015 121.77);
  --foreground: oklch(0.988 0.004 122.284);
  --muted: oklch(0.216 0.016 123.42);
  --muted-foreground: oklch(0.728 0.016 122.564);
  --popover: oklch(0.102 0.015 121.77);
  --popover-foreground: oklch(0.988 0.004 122.284);
  --card: oklch(0.102 0.015 121.77);
  --card-foreground: oklch(0.988 0.004 122.284);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.761 0.16 126.399);
  --primary-foreground: oklch(0.283 0.053 125.701);
  --secondary: oklch(0.33 0.013 122.824);
  --secondary-foreground: oklch(0.852 0.01 122.4);
  --accent: oklch(0.33 0.013 122.824);
  --accent-foreground: oklch(0.852 0.01 122.4);
  --destructive: oklch(0.629 0.223 27.845);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.761 0.16 126.399);
  --chart-1: oklch(0.761 0.16 126.399);
  --chart-2: oklch(0.33 0.013 122.824);
  --chart-3: oklch(0.33 0.013 122.824);
  --chart-4: oklch(0.361 0.014 122.841);
  --chart-5: oklch(0.77 0.166 126.627);
}