Vein for shadcn/ui

Vein is a shadcn/ui theme built around a vivid deep purple primary color (#4e0341) with vivid deep green accents (#034e11). The light mode uses a neutral background (#fdfcfd). Dark mode keeps the vivid deep purple primary (#4e0341) on a neutral background (#040103).

Color palette

TokenLightDark
Background
#fdfcfdwhite
#040103black
Foreground
#000000black
#fdfcfdwhite
Card
#fcf8fbsnow
#080207black
Card foreground
#000000black
#ffffffwhite
Popover
#fdfcfdwhite
#040103black
Popover foreground
#000000black
#fdfcfdwhite
Primary
#4e0341indigo
#4e0341indigo
Primary foreground
#fa89e5violet
#fa89e5violet
Secondary
#034e11darkgreen
#034e11darkgreen
Secondary foreground
#28f64dlimegreen
#28f64dlimegreen
Muted
#eaf0ebwhitesmoke
#0f1510black
Muted foreground
#465349darkslategray
#acb9afdarkgray
Accent
#034e11darkgreen
#034e11darkgreen
Accent foreground
#28f64dlimegreen
#28f64dlimegreen
Destructive
#d2120ffirebrick
#ea1410red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4e0341indigo
#4e0341indigo

Contrast

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

Light mode
Text on background20.48:1AAA
Text on card19.97:1AAA
Primary button6.90:1AA
Secondary button6.80:1AA
Muted text7.01:1AAA
Accent6.80:1AA
Destructive5.48:1AA
Dark mode
Text on background20.28:1AAA
Text on card20.53:1AAA
Primary button6.90:1AA
Secondary button6.80:1AA
Muted text9.09:1AAA
Accent6.80:1AA
Destructive4.57:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.002 331.442);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.95 0.009 151.268);
  --muted-foreground: oklch(0.427 0.023 150.625);
  --popover: oklch(0.992 0.002 331.442);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.983 0.005 331.478);
  --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.292 0.123 337.722);
  --primary-foreground: oklch(0.783 0.175 334.32);
  --secondary: oklch(0.37 0.115 144.848);
  --secondary-foreground: oklch(0.849 0.258 144.87);
  --accent: oklch(0.37 0.115 144.848);
  --accent-foreground: oklch(0.849 0.258 144.87);
  --destructive: oklch(0.547 0.217 28.882);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.292 0.123 337.722);
  --chart-1: oklch(0.292 0.123 337.722);
  --chart-2: oklch(0.37 0.115 144.848);
  --chart-3: oklch(0.37 0.115 144.848);
  --chart-4: oklch(0.416 0.13 144.598);
  --chart-5: oklch(0.294 0.126 337.867);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.085 0.019 332.417);
  --foreground: oklch(0.992 0.002 331.435);
  --muted: oklch(0.187 0.014 150.305);
  --muted-foreground: oklch(0.772 0.02 151.04);
  --popover: oklch(0.085 0.019 332.417);
  --popover-foreground: oklch(0.992 0.002 331.435);
  --card: oklch(0.107 0.024 332.417);
  --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.292 0.123 337.722);
  --primary-foreground: oklch(0.783 0.175 334.32);
  --secondary: oklch(0.37 0.115 144.848);
  --secondary-foreground: oklch(0.849 0.258 144.87);
  --accent: oklch(0.37 0.115 144.848);
  --accent-foreground: oklch(0.849 0.258 144.87);
  --destructive: oklch(0.593 0.236 28.927);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.292 0.123 337.722);
  --chart-1: oklch(0.292 0.123 337.722);
  --chart-2: oklch(0.37 0.115 144.848);
  --chart-3: oklch(0.37 0.115 144.848);
  --chart-4: oklch(0.416 0.13 144.598);
  --chart-5: oklch(0.294 0.126 337.867);
}