Hearty for shadcn/ui

Hearty is a shadcn/ui theme built around a deep purple primary color (#11030d) with deep cyan accents (#030d11). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep purple primary (#11030d) on a neutral background (#080206).

Color palette

TokenLightDark
Background
#ffffffwhite
#080206black
Foreground
#000000black
#f9f6f8whitesmoke
Card
#fcfcfcsnow
#0c0309black
Card foreground
#000000black
#fbf9fasnow
Popover
#fcfcfcsnow
#0c0309black
Popover foreground
#000000black
#fbf9fasnow
Primary
#11030dblack
#11030dblack
Primary foreground
#e364bdorchid
#e364bdorchid
Secondary
#0d1103black
#0d1103black
Secondary foreground
#8fbe23yellowgreen
#8fbe23yellowgreen
Muted
#f1f4ebwhitesmoke
#11140bblack
Muted foreground
#686f58dimgray
#a0a790darkgray
Accent
#030d11black
#030d11black
Accent foreground
#64bde3skyblue
#64bde3skyblue
Destructive
#a3260afirebrick
#f3603ftomato
Destructive foreground
#fde7e2mistyrose
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#11030dblack
#11030dblack

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button6.53:1AA
Secondary button8.68:1AAA
Muted text4.72:1AA
Accent9.28:1AAA
Destructive6.22:1AA
Dark mode
Text on background19.14:1AAA
Text on card19.38:1AAA
Primary button6.53:1AA
Secondary button8.68:1AAA
Muted text7.48:1AAA
Accent9.28:1AAA
Destructive6.55:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.963 0.012 120.242);
  --muted-foreground: oklch(0.53 0.037 121.237);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --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.135 0.037 338.557);
  --primary-foreground: oklch(0.686 0.186 340.652);
  --secondary: oklch(0.169 0.031 121.815);
  --secondary-foreground: oklch(0.741 0.178 125.954);
  --accent: oklch(0.15 0.02 223.179);
  --accent-foreground: oklch(0.756 0.101 228.223);
  --destructive: oklch(0.471 0.165 33.271);
  --destructive-foreground: oklch(0.945 0.025 32.686);
  --ring: oklch(0.135 0.037 338.557);
  --chart-1: oklch(0.135 0.037 338.557);
  --chart-2: oklch(0.169 0.031 121.815);
  --chart-3: oklch(0.15 0.02 223.179);
  --chart-4: oklch(0.221 0.044 123.705);
  --chart-5: oklch(0.134 0.039 338.658);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.107 0.024 336.438);
  --foreground: oklch(0.976 0.004 335.947);
  --muted: oklch(0.183 0.017 121.665);
  --muted-foreground: oklch(0.717 0.035 120.857);
  --popover: oklch(0.122 0.028 336.839);
  --popover-foreground: oklch(0.984 0.003 335.92);
  --card: oklch(0.122 0.028 336.839);
  --card-foreground: oklch(0.984 0.003 335.92);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.135 0.037 338.557);
  --primary-foreground: oklch(0.686 0.186 340.652);
  --secondary: oklch(0.169 0.031 121.815);
  --secondary-foreground: oklch(0.741 0.178 125.954);
  --accent: oklch(0.15 0.02 223.179);
  --accent-foreground: oklch(0.756 0.101 228.223);
  --destructive: oklch(0.673 0.187 34.153);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.135 0.037 338.557);
  --chart-1: oklch(0.135 0.037 338.557);
  --chart-2: oklch(0.169 0.031 121.815);
  --chart-3: oklch(0.15 0.02 223.179);
  --chart-4: oklch(0.221 0.044 123.705);
  --chart-5: oklch(0.134 0.039 338.658);
}