Vain for shadcn/ui

Vain is a shadcn/ui theme built around a red primary color (#87263e) with blue accents (#263e87). The light mode uses a neutral background (#fcf8f9). Dark mode keeps the red primary (#87263e) on a neutral background (#040102).

Color palette

TokenLightDark
Background
#fcf8f9snow
#040102black
Foreground
#090103black
#ffffffwhite
Card
#fbf4f6lavenderblush
#080204black
Card foreground
#040102black
#ffffffwhite
Popover
#fcf8f9snow
#040102black
Popover foreground
#090103black
#ffffffwhite
Primary
#87263ebrown
#87263ebrown
Primary foreground
#f8e7eblinen
#f8e7eblinen
Secondary
#3e8726forestgreen
#3e8726forestgreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e6ece4beige
#151b13black
Muted foreground
#3f4a3bdarkslategray
#b9c4b5silver
Accent
#263e87darkslateblue
#263e87darkslateblue
Accent foreground
#e7ebf8lavender
#e7ebf8lavender
Destructive
#9d1801darkred
#fe5234tomato
Destructive foreground
#ffd8d1bisque
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#87263ebrown
#87263ebrown

Contrast

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

Light mode
Text on background19.55:1AAA
Text on card19.15:1AAA
Primary button7.39:1AAA
Secondary button4.45:1AA Large
Muted text7.75:1AAA
Accent8.27:1AAA
Destructive6.21:1AA
Dark mode
Text on background20.77:1AAA
Text on card20.56:1AAA
Primary button7.39:1AAA
Secondary button4.45:1AA Large
Muted text9.71:1AAA
Accent8.27:1AAA
Destructive6.47:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.005 0.013);
  --foreground: oklch(0.102 0.025 359.758);
  --muted: oklch(0.936 0.012 137.785);
  --muted-foreground: oklch(0.393 0.028 137.895);
  --popover: oklch(0.982 0.005 0.013);
  --popover-foreground: oklch(0.102 0.025 359.758);
  --card: oklch(0.973 0.008 0.089);
  --card-foreground: oklch(0.081 0.02 359.758);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.427 0.132 9.913);
  --primary-foreground: oklch(0.943 0.019 0.442);
  --secondary: oklch(0.557 0.15 139.023);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.39 0.125 266.641);
  --accent-foreground: oklch(0.942 0.018 271.224);
  --destructive: oklch(0.448 0.17 31.898);
  --destructive-foreground: oklch(0.913 0.044 29.717);
  --ring: oklch(0.427 0.132 9.913);
  --chart-1: oklch(0.427 0.132 9.913);
  --chart-2: oklch(0.557 0.15 139.023);
  --chart-3: oklch(0.39 0.125 266.641);
  --chart-4: oklch(0.592 0.16 139.047);
  --chart-5: oklch(0.429 0.137 10.583);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.083 0.015 359.785);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.213 0.017 137.919);
  --muted-foreground: oklch(0.808 0.023 137.813);
  --popover: oklch(0.083 0.015 359.785);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.105 0.019 359.785);
  --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.427 0.132 9.913);
  --primary-foreground: oklch(0.943 0.019 0.442);
  --secondary: oklch(0.557 0.15 139.023);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.39 0.125 266.641);
  --accent-foreground: oklch(0.942 0.018 271.224);
  --destructive: oklch(0.674 0.213 32.379);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.427 0.132 9.913);
  --chart-1: oklch(0.427 0.132 9.913);
  --chart-2: oklch(0.557 0.15 139.023);
  --chart-3: oklch(0.39 0.125 266.641);
  --chart-4: oklch(0.592 0.16 139.047);
  --chart-5: oklch(0.429 0.137 10.583);
}