Hateful for shadcn/ui

Hateful is a shadcn/ui theme built around a near-white primary color (#ebebeb) with near-white accents (#ebebeb). The light mode uses a neutral background (#fbf8f8). Dark mode keeps the near-white primary (#ebebeb) on a red-tinted background (#0f0606).

Color palette

TokenLightDark
Background
#fbf8f8snow
#0f0606black
Foreground
#040101black
#ffffffwhite
Card
#faf5f5whitesmoke
#120707black
Card foreground
#000000black
#ffffffwhite
Popover
#fbf8f8snow
#0f0606black
Popover foreground
#040101black
#ffffffwhite
Primary
#ebebeblinen
#ebebeblinen
Primary foreground
#525252darkslategray
#525252darkslategray
Secondary
#ebebeblinen
#ebebeblinen
Secondary foreground
#525252darkslategray
#525252darkslategray
Muted
#ebd6d6gainsboro
#291414black
Muted foreground
#483737darkslategray
#c8b7b7silver
Accent
#ebebeblinen
#ebebeblinen
Accent foreground
#525252darkslategray
#525252darkslategray
Destructive
#6f0701maroon
#f20e02red
Destructive foreground
#fea9a4lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#ebebeblinen
#ebebeblinen

Contrast

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

Light mode
Text on background19.74:1AAA
Text on card19.43:1AAA
Primary button6.53:1AA
Secondary button6.53:1AA
Muted text8.05:1AAA
Accent6.53:1AA
Destructive6.69:1AA
Dark mode
Text on background20.04:1AAA
Text on card19.79:1AAA
Primary button6.53:1AA
Secondary button6.53:1AA
Muted text9.04:1AAA
Accent6.53:1AA
Destructive4.32:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.003 17.215);
  --foreground: oklch(0.08 0.018 21.811);
  --muted: oklch(0.893 0.023 17.593);
  --muted-foreground: oklch(0.357 0.024 18.323);
  --popover: oklch(0.983 0.003 17.215);
  --popover-foreground: oklch(0.08 0.018 21.811);
  --card: oklch(0.974 0.005 17.244);
  --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.939 0 180);
  --primary-foreground: oklch(0.437 0 180);
  --secondary: oklch(0.939 0 180);
  --secondary-foreground: oklch(0.437 0 180);
  --accent: oklch(0.939 0 180);
  --accent-foreground: oklch(0.437 0 180);
  --destructive: oklch(0.344 0.136 30.12);
  --destructive-foreground: oklch(0.816 0.102 22.842);
  --ring: oklch(0.939 0 180);
  --chart-1: oklch(0.939 0 180);
  --chart-2: oklch(0.939 0 180);
  --chart-3: oklch(0.939 0 180);
  --chart-4: oklch(0.962 0 180);
  --chart-5: oklch(0.938 0.001 17.181);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.135 0.018 19.604);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.222 0.034 20.173);
  --muted-foreground: oklch(0.793 0.019 17.559);
  --popover: oklch(0.135 0.018 19.604);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.147 0.02 19.807);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.939 0 180);
  --primary-foreground: oklch(0.437 0 180);
  --secondary: oklch(0.939 0 180);
  --secondary-foreground: oklch(0.437 0 180);
  --accent: oklch(0.939 0 180);
  --accent-foreground: oklch(0.437 0 180);
  --destructive: oklch(0.607 0.245 29.596);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.939 0 180);
  --chart-1: oklch(0.939 0 180);
  --chart-2: oklch(0.939 0 180);
  --chart-3: oklch(0.939 0 180);
  --chart-4: oklch(0.962 0 180);
  --chart-5: oklch(0.938 0.001 17.181);
}