Hearty for shadcn/ui

Hearty is a shadcn/ui theme built around a neutral gray primary color (#7e7275) with neutral gray accents (#72757e). The light mode uses a neutral background (#fcf8f9). Dark mode keeps the neutral gray primary (#7e7275) on a red-tinted background (#0b0406).

Color palette

TokenLightDark
Background
#fcf8f9snow
#0b0406black
Foreground
#050102black
#ffffffwhite
Card
#faf5f6whitesmoke
#0e0608black
Card foreground
#000000black
#ffffffwhite
Popover
#fcf8f9snow
#0b0406black
Popover foreground
#050102black
#ffffffwhite
Primary
#7e7275gray
#7e7275gray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#757e72gray
#757e72gray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ecf0ebwhitesmoke
#11140fblack
Muted foreground
#575d56dimgray
#a4a9a2darkgray
Accent
#72757egray
#72757egray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#6c2509maroon
#ed622cchocolate
Destructive foreground
#f8c4aflightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7e7275gray
#7e7275gray

Contrast

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

Light mode
Text on background19.71:1AAA
Text on card19.43:1AAA
Primary button4.62:1AA
Secondary button4.22:1AA Large
Muted text5.85:1AA
Accent4.61:1AA
Destructive7.07:1AAA
Dark mode
Text on background20.27:1AAA
Text on card20.02:1AAA
Primary button4.62:1AA
Secondary button4.22:1AA Large
Muted text7.74:1AAA
Accent4.61:1AA
Destructive6.38:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.004 359.974);
  --foreground: oklch(0.079 0.023 359.737);
  --muted: oklch(0.95 0.008 137.777);
  --muted-foreground: oklch(0.471 0.013 137.811);
  --popover: oklch(0.983 0.004 359.974);
  --popover-foreground: oklch(0.079 0.023 359.737);
  --card: oklch(0.974 0.006 0.03);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.564 0.016 0.632);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.581 0.021 137.826);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.562 0.014 271.157);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.368 0.107 39.42);
  --destructive-foreground: oklch(0.861 0.066 42.621);
  --ring: oklch(0.564 0.016 0.632);
  --chart-1: oklch(0.564 0.016 0.632);
  --chart-2: oklch(0.581 0.021 137.826);
  --chart-3: oklch(0.562 0.014 271.157);
  --chart-4: oklch(0.608 0.022 137.826);
  --chart-5: oklch(0.559 0.025 1.103);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.015 359.861);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.187 0.012 137.875);
  --muted-foreground: oklch(0.729 0.012 137.79);
  --popover: oklch(0.124 0.015 359.861);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.137 0.018 0.937);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.564 0.016 0.632);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.581 0.021 137.826);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.562 0.014 271.157);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.665 0.183 40.093);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.564 0.016 0.632);
  --chart-1: oklch(0.564 0.016 0.632);
  --chart-2: oklch(0.581 0.021 137.826);
  --chart-3: oklch(0.562 0.014 271.157);
  --chart-4: oklch(0.608 0.022 137.826);
  --chart-5: oklch(0.559 0.025 1.103);
}