Hefty for shadcn/ui

Hefty is a shadcn/ui theme built around a near-black primary color (#0f0c00) with neutral gray accents (#d9d3d3). The light mode uses a neutral background (#fdfdfc). Dark mode keeps the near-black primary (#0f0c00) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdfdfcwhite
#000000black
Foreground
#090701black
#fbfbf8snow
Card
#fdfdfcwhite
#000000black
Card foreground
#090701black
#fbfbf8snow
Popover
#fdfdfcwhite
#000000black
Popover foreground
#090701black
#fbfbf8snow
Primary
#0f0c00black
#0f0c00black
Primary foreground
#dba800goldenrod
#dba800goldenrod
Secondary
#e8e8e8lavender
#32312fdarkslategray
Secondary foreground
#4f4f4fdarkslategray
#cbcac8lightgrey
Muted
#f1e9e9linen
#16140eblack
Muted foreground
#4f3b3bdarkslategray
#c4c0b0silver
Accent
#d9d3d3lightgrey
#514e43darkolivegreen
Accent foreground
#413939darkslategray
#e6e4e0gainsboro
Destructive
#722a09saddlebrown
#ee5e1bchocolate
Destructive foreground
#f9c9b3peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0f0c00black
#0f0c00black

Contrast

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

Light mode
Text on background19.78:1AAA
Text on card19.78:1AAA
Primary button8.96:1AAA
Secondary button6.68:1AA
Muted text8.70:1AAA
Accent7.62:1AAA
Destructive6.85:1AA
Dark mode
Text on background20.25:1AAA
Text on card20.25:1AAA
Primary button8.96:1AAA
Secondary button7.91:1AAA
Muted text10.09:1AAA
Accent6.56:1AA
Destructive6.24:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.002 92.675);
  --foreground: oklch(0.128 0.02 98.436);
  --muted: oklch(0.941 0.009 17.315);
  --muted-foreground: oklch(0.373 0.029 18.556);
  --popover: oklch(0.994 0.002 92.675);
  --popover-foreground: oklch(0.128 0.02 98.436);
  --card: oklch(0.994 0.002 92.675);
  --card-foreground: oklch(0.128 0.02 98.436);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.153 0.032 98.367);
  --primary-foreground: oklch(0.758 0.155 86.552);
  --secondary: oklch(0.931 0 180);
  --secondary-foreground: oklch(0.428 0 180);
  --accent: oklch(0.872 0.006 17.277);
  --accent-foreground: oklch(0.353 0.012 17.737);
  --destructive: oklch(0.385 0.11 41.399);
  --destructive-foreground: oklch(0.873 0.063 46.177);
  --ring: oklch(0.153 0.032 98.367);
  --chart-1: oklch(0.153 0.032 98.367);
  --chart-2: oklch(0.931 0 180);
  --chart-3: oklch(0.872 0.006 17.277);
  --chart-4: oklch(0.954 0 180);
  --chart-5: oklch(0.154 0.033 98.472);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.987 0.003 92.688);
  --muted: oklch(0.191 0.013 93.128);
  --muted-foreground: oklch(0.806 0.022 92.907);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.987 0.003 92.688);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.987 0.003 92.688);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.153 0.032 98.367);
  --primary-foreground: oklch(0.758 0.155 86.552);
  --secondary: oklch(0.314 0.004 92.78);
  --secondary-foreground: oklch(0.84 0.003 92.698);
  --accent: oklch(0.423 0.019 93.023);
  --accent-foreground: oklch(0.92 0.006 92.72);
  --destructive: oklch(0.66 0.191 41.073);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.153 0.032 98.367);
  --chart-1: oklch(0.153 0.032 98.367);
  --chart-2: oklch(0.314 0.004 92.78);
  --chart-3: oklch(0.423 0.019 93.023);
  --chart-4: oklch(0.344 0.005 92.783);
  --chart-5: oklch(0.154 0.033 98.472);
}