Heifer for shadcn/ui

Heifer is a shadcn/ui theme built around a neutral gray primary color (#8f8490) with neutral gray accents (#849084). The light mode uses a neutral background (#fdf7fd). Dark mode keeps the neutral gray primary (#8f8490) on a purple-tinted background (#0e060e).

Color palette

TokenLightDark
Background
#fdf7fdsnow
#0e060eblack
Foreground
#120212black
#f9f6f9whitesmoke
Card
#fdf7fdsnow
#0e060eblack
Card foreground
#120212black
#f9f6f9whitesmoke
Popover
#fdf7fdsnow
#0e060eblack
Popover foreground
#120212black
#f9f6f9whitesmoke
Primary
#8f8490gray
#8f8490gray
Primary foreground
#000000black
#000000black
Secondary
#849084gray
#849084gray
Secondary foreground
#000000black
#000000black
Muted
#dadddagainsboro
#222522black
Muted foreground
#626462dimgray
#9b9d9bdarkgray
Accent
#849084gray
#849084gray
Accent foreground
#000000black
#000000black
Destructive
#640907maroon
#ef1e1acrimson
Destructive foreground
#f9a6a4lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8f8490gray
#8f8490gray

Contrast

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

Light mode
Text on background19.07:1AAA
Text on card19.07:1AAA
Primary button5.86:1AA
Secondary button6.27:1AA
Muted text4.35:1AA Large
Accent6.27:1AA
Destructive6.95:1AA
Dark mode
Text on background18.60:1AAA
Text on card18.60:1AAA
Primary button5.86:1AA
Secondary button6.27:1AA
Muted text5.64:1AA
Accent6.27:1AA
Destructive4.31:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.009 325.166);
  --foreground: oklch(0.136 0.047 327.215);
  --muted: oklch(0.894 0.006 145.053);
  --muted-foreground: oklch(0.502 0.004 145.046);
  --popover: oklch(0.982 0.009 325.166);
  --popover-foreground: oklch(0.136 0.047 327.215);
  --card: oklch(0.982 0.009 325.166);
  --card-foreground: oklch(0.136 0.047 327.215);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.627 0.022 325.341);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.639 0.022 144.858);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.639 0.022 144.858);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.323 0.123 28.377);
  --destructive-foreground: oklch(0.805 0.099 20.536);
  --ring: oklch(0.627 0.022 325.341);
  --chart-1: oklch(0.627 0.022 325.341);
  --chart-2: oklch(0.639 0.022 144.858);
  --chart-3: oklch(0.639 0.022 144.858);
  --chart-4: oklch(0.664 0.02 144.885);
  --chart-5: oklch(0.624 0.035 325.483);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.141 0.022 326.15);
  --foreground: oklch(0.975 0.006 325.144);
  --muted: oklch(0.262 0.008 144.876);
  --muted-foreground: oklch(0.692 0.004 145.064);
  --popover: oklch(0.141 0.022 326.15);
  --popover-foreground: oklch(0.975 0.006 325.144);
  --card: oklch(0.141 0.022 326.15);
  --card-foreground: oklch(0.975 0.006 325.144);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.627 0.022 325.341);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.639 0.022 144.858);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.639 0.022 144.858);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.607 0.237 28.588);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.627 0.022 325.341);
  --chart-1: oklch(0.627 0.022 325.341);
  --chart-2: oklch(0.639 0.022 144.858);
  --chart-3: oklch(0.639 0.022 144.858);
  --chart-4: oklch(0.664 0.02 144.885);
  --chart-5: oklch(0.624 0.035 325.483);
}