Hard for shadcn/ui

Hard is a shadcn/ui theme built around a deep blue primary color (#102c65) with deep indigo accents (#1e1065). The light mode uses a neutral background (#f8f9fc). Dark mode keeps the deep blue primary (#102c65) on a neutral background (#030407).

Color palette

TokenLightDark
Background
#f8f9fcghostwhite
#030407black
Foreground
#010204black
#f8f9fcghostwhite
Card
#f8f9fcghostwhite
#030407black
Card foreground
#010204black
#f8f9fcghostwhite
Popover
#f8f9fcghostwhite
#030407black
Popover foreground
#010204black
#f8f9fcghostwhite
Primary
#102c65midnightblue
#102c65midnightblue
Primary foreground
#b4c9f3lightblue
#b4c9f3lightblue
Secondary
#105765darkslategray
#105765darkslategray
Secondary foreground
#b4e9f3paleturquoise
#b4e9f3paleturquoise
Muted
#dce4e5gainsboro
#1a2223black
Muted foreground
#546164dimgray
#9ba9abdarkgray
Accent
#1e1065midnightblue
#1e1065midnightblue
Accent foreground
#bfb4f3lightsteelblue
#bfb4f3lightsteelblue
Destructive
#a7380csaddlebrown
#d7470fchocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#102c65midnightblue
#102c65midnightblue

Contrast

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

Light mode
Text on background19.74:1AAA
Text on card19.74:1AAA
Primary button7.98:1AAA
Secondary button6.15:1AA
Muted text4.95:1AA
Accent8.37:1AAA
Destructive6.55:1AA
Dark mode
Text on background19.43:1AAA
Text on card19.43:1AAA
Primary button7.98:1AAA
Secondary button6.15:1AA
Muted text6.68:1AA
Accent8.37:1AAA
Destructive4.37:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.004 264.539);
  --foreground: oklch(0.085 0.011 256.404);
  --muted: oklch(0.912 0.009 211.038);
  --muted-foreground: oklch(0.483 0.018 211.08);
  --popover: oklch(0.983 0.004 264.539);
  --popover-foreground: oklch(0.085 0.011 256.404);
  --card: oklch(0.983 0.004 264.539);
  --card-foreground: oklch(0.085 0.011 256.404);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.311 0.107 262.182);
  --primary-foreground: oklch(0.835 0.064 264.142);
  --secondary: oklch(0.423 0.069 215.024);
  --secondary-foreground: oklch(0.9 0.056 211.228);
  --accent: oklch(0.267 0.138 279.121);
  --accent-foreground: oklch(0.801 0.089 291.897);
  --destructive: oklch(0.496 0.154 38.34);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.311 0.107 262.182);
  --chart-1: oklch(0.311 0.107 262.182);
  --chart-2: oklch(0.423 0.069 215.024);
  --chart-3: oklch(0.267 0.138 279.121);
  --chart-4: oklch(0.461 0.076 215.192);
  --chart-5: oklch(0.311 0.111 262.147);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.11 0.01 259.142);
  --foreground: oklch(0.983 0.004 264.539);
  --muted: oklch(0.244 0.012 211.142);
  --muted-foreground: oklch(0.724 0.016 211.045);
  --popover: oklch(0.11 0.01 259.142);
  --popover-foreground: oklch(0.983 0.004 264.539);
  --card: oklch(0.11 0.01 259.142);
  --card-foreground: oklch(0.983 0.004 264.539);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.311 0.107 262.182);
  --primary-foreground: oklch(0.835 0.064 264.142);
  --secondary: oklch(0.423 0.069 215.024);
  --secondary-foreground: oklch(0.9 0.056 211.228);
  --accent: oklch(0.267 0.138 279.121);
  --accent-foreground: oklch(0.801 0.089 291.897);
  --destructive: oklch(0.595 0.189 37.972);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.311 0.107 262.182);
  --chart-1: oklch(0.311 0.107 262.182);
  --chart-2: oklch(0.423 0.069 215.024);
  --chart-3: oklch(0.267 0.138 279.121);
  --chart-4: oklch(0.461 0.076 215.192);
  --chart-5: oklch(0.311 0.111 262.147);
}