Villainous for shadcn/ui

Villainous is a shadcn/ui theme built around a neutral gray primary color (#a0aba3) with neutral gray accents (#aba0a8). The light mode uses a neutral background (#fbfefc). Dark mode keeps the neutral gray primary (#a0aba3) on a neutral background (#030704).

Color palette

TokenLightDark
Background
#fbfefcwhite
#030704black
Foreground
#000000black
#f9fbfamintcream
Card
#f8fcf9mintcream
#050a07black
Card foreground
#000000black
#fcfdfcwhite
Popover
#fbfefcwhite
#030704black
Popover foreground
#000000black
#f9fbfamintcream
Primary
#a0aba3darkgray
#a0aba3darkgray
Primary foreground
#0c0e0cblack
#0c0e0cblack
Secondary
#aba0a8darkgray
#aba0a8darkgray
Secondary foreground
#0e0c0dblack
#0e0c0dblack
Muted
#f0e6edlinen
#1a0f17black
Muted foreground
#54404edarkslategray
#bfabbasilver
Accent
#aba0a8darkgray
#aba0a8darkgray
Accent foreground
#0e0c0dblack
#0e0c0dblack
Destructive
#7a1101maroon
#fe4f34tomato
Destructive foreground
#ffb9aelightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a0aba3darkgray
#a0aba3darkgray

Contrast

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

Light mode
Text on background20.63:1AAA
Text on card20.27:1AAA
Primary button8.18:1AAA
Secondary button7.75:1AAA
Muted text7.73:1AAA
Accent7.75:1AAA
Destructive6.72:1AA
Dark mode
Text on background19.51:1AAA
Text on card19.55:1AAA
Primary button8.18:1AAA
Secondary button7.75:1AAA
Muted text8.66:1AAA
Accent7.75:1AAA
Destructive6.37:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 155.135);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.934 0.015 335.474);
  --muted-foreground: oklch(0.398 0.037 336.792);
  --popover: oklch(0.994 0.003 155.135);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.987 0.006 155.079);
  --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.731 0.016 154.778);
  --primary-foreground: oklch(0.159 0.003 154.795);
  --secondary: oklch(0.718 0.016 335.602);
  --secondary-foreground: oklch(0.157 0.003 335.585);
  --accent: oklch(0.718 0.016 335.602);
  --accent-foreground: oklch(0.157 0.003 335.585);
  --destructive: oklch(0.373 0.141 31.953);
  --destructive-foreground: oklch(0.847 0.083 28.754);
  --ring: oklch(0.731 0.016 154.778);
  --chart-1: oklch(0.731 0.016 154.778);
  --chart-2: oklch(0.718 0.016 335.602);
  --chart-3: oklch(0.718 0.016 335.602);
  --chart-4: oklch(0.744 0.015 335.551);
  --chart-5: oklch(0.734 0.024 154.57);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.12 0.011 154.88);
  --foreground: oklch(0.986 0.002 155.145);
  --muted: oklch(0.187 0.022 337.195);
  --muted-foreground: oklch(0.762 0.031 335.92);
  --popover: oklch(0.12 0.011 154.88);
  --popover-foreground: oklch(0.986 0.002 155.145);
  --card: oklch(0.137 0.013 154.88);
  --card-foreground: oklch(0.993 0.001 155.168);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.731 0.016 154.778);
  --primary-foreground: oklch(0.159 0.003 154.795);
  --secondary: oklch(0.718 0.016 335.602);
  --secondary-foreground: oklch(0.157 0.003 335.585);
  --accent: oklch(0.718 0.016 335.602);
  --accent-foreground: oklch(0.157 0.003 335.585);
  --destructive: oklch(0.67 0.216 31.604);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.731 0.016 154.778);
  --chart-1: oklch(0.731 0.016 154.778);
  --chart-2: oklch(0.718 0.016 335.602);
  --chart-3: oklch(0.718 0.016 335.602);
  --chart-4: oklch(0.744 0.015 335.551);
  --chart-5: oklch(0.734 0.024 154.57);
}