Hard for shadcn/ui

Hard is a shadcn/ui theme built around a vivid deep teal primary color (#063d26) with vivid deep orange accents (#3d2606). The light mode uses a neutral background (#f8fcfa). Dark mode keeps the vivid deep teal primary (#063d26) on a neutral background (#040705).

Color palette

TokenLightDark
Background
#f8fcfamintcream
#040705black
Foreground
#030c08black
#f8fbfamintcream
Card
#f4fbf8mintcream
#050a08black
Card foreground
#020806black
#fcfdfdwhite
Popover
#f4fbf8mintcream
#050a08black
Popover foreground
#020806black
#fcfdfdwhite
Primary
#063d26darkgreen
#063d26darkgreen
Primary foreground
#24eb98mediumspringgreen
#24eb98mediumspringgreen
Secondary
#26063dmidnightblue
#26063dmidnightblue
Secondary foreground
#c481f3orchid
#c481f3orchid
Muted
#e8e6ealavender
#171519black
Muted foreground
#584e5fdimgray
#aaa0b1darkgray
Accent
#3d2606black
#3d2606black
Accent foreground
#eb9824goldenrod
#eb9824goldenrod
Destructive
#a81f00firebrick
#ff5029tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#063d26darkgreen
#063d26darkgreen

Contrast

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

Light mode
Text on background19.15:1AAA
Text on card19.19:1AAA
Primary button7.91:1AAA
Secondary button6.63:1AA
Muted text6.34:1AA
Accent6.14:1AA
Destructive7.32:1AAA
Dark mode
Text on background19.47:1AAA
Text on card19.55:1AAA
Primary button7.91:1AAA
Secondary button6.63:1AA
Muted text7.24:1AAA
Accent6.14:1AA
Destructive6.43:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.005 169.517);
  --foreground: oklch(0.143 0.019 169.458);
  --muted: oklch(0.928 0.007 311.665);
  --muted-foreground: oklch(0.44 0.031 311.164);
  --popover: oklch(0.981 0.008 169.439);
  --popover-foreground: oklch(0.124 0.016 169.939);
  --card: oklch(0.981 0.008 169.439);
  --card-foreground: oklch(0.124 0.016 169.939);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.318 0.068 159.648);
  --primary-foreground: oklch(0.83 0.187 158.238);
  --secondary: oklch(0.218 0.098 306.163);
  --secondary-foreground: oklch(0.716 0.172 309.606);
  --accent: oklch(0.29 0.056 70.782);
  --accent-foreground: oklch(0.746 0.153 68.51);
  --destructive: oklch(0.474 0.176 32.769);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.318 0.068 159.648);
  --chart-1: oklch(0.318 0.068 159.648);
  --chart-2: oklch(0.218 0.098 306.163);
  --chart-3: oklch(0.29 0.056 70.782);
  --chart-4: oklch(0.247 0.114 305.533);
  --chart-5: oklch(0.321 0.07 159.366);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.12 0.009 169.818);
  --foreground: oklch(0.987 0.003 169.573);
  --muted: oklch(0.199 0.01 311.324);
  --muted-foreground: oklch(0.719 0.027 311.42);
  --popover: oklch(0.138 0.01 169.818);
  --popover-foreground: oklch(0.993 0.002 169.622);
  --card: oklch(0.138 0.01 169.818);
  --card-foreground: oklch(0.993 0.002 169.622);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.318 0.068 159.648);
  --primary-foreground: oklch(0.83 0.187 158.238);
  --secondary: oklch(0.218 0.098 306.163);
  --secondary-foreground: oklch(0.716 0.172 309.606);
  --accent: oklch(0.29 0.056 70.782);
  --accent-foreground: oklch(0.746 0.153 68.51);
  --destructive: oklch(0.672 0.217 33.866);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.318 0.068 159.648);
  --chart-1: oklch(0.318 0.068 159.648);
  --chart-2: oklch(0.218 0.098 306.163);
  --chart-3: oklch(0.29 0.056 70.782);
  --chart-4: oklch(0.247 0.114 305.533);
  --chart-5: oklch(0.321 0.07 159.366);
}