Vital for shadcn/ui

Vital is a shadcn/ui theme built around a muted deep violet primary color (#2c2339) with muted light violet accents (#c8c1d1). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the muted deep violet primary (#2c2339) on a neutral background (#050307).

Color palette

TokenLightDark
Background
#fcfcfdwhite
#050307black
Foreground
#040109black
#ffffffwhite
Card
#fcfcfdwhite
#050307black
Card foreground
#040109black
#ffffffwhite
Popover
#fcfcfdwhite
#050307black
Popover foreground
#040109black
#ffffffwhite
Primary
#2c2339darkslategray
#2c2339darkslategray
Primary foreground
#c4b9d4thistle
#c4b9d4thistle
Secondary
#d8d5dcgainsboro
#28242ddarkslategray
Secondary foreground
#3f3a45darkslategray
#c0bbc9silver
Muted
#dfdae7gainsboro
#1d1825black
Muted foreground
#515152darkslategray
#adadaedarkgray
Accent
#c8c1d1thistle
#3b3149darkslategray
Accent foreground
#2f2938darkslategray
#d5cedelightgrey
Destructive
#841f06maroon
#f4461aorangered
Destructive foreground
#fcccc0peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2c2339darkslategray
#2c2339darkslategray

Contrast

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

Light mode
Text on background20.16:1AAA
Text on card20.16:1AAA
Primary button8.00:1AAA
Secondary button7.62:1AAA
Muted text5.78:1AA
Accent8.05:1AAA
Destructive6.68:1AA
Dark mode
Text on background20.50:1AAA
Text on card20.50:1AAA
Primary button8.00:1AAA
Secondary button8.08:1AAA
Muted text7.72:1AAA
Accent7.97:1AAA
Destructive3.65:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 304.308);
  --foreground: oklch(0.093 0.032 306.035);
  --muted: oklch(0.896 0.018 304.054);
  --muted-foreground: oklch(0.435 0.003 304.254);
  --popover: oklch(0.991 0.003 304.308);
  --popover-foreground: oklch(0.093 0.032 306.035);
  --card: oklch(0.991 0.003 304.308);
  --card-foreground: oklch(0.093 0.032 306.035);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.276 0.041 302.133);
  --primary-foreground: oklch(0.804 0.039 303.647);
  --secondary: oklch(0.878 0.01 304.185);
  --secondary-foreground: oklch(0.358 0.02 303.526);
  --accent: oklch(0.822 0.023 303.94);
  --accent-foreground: oklch(0.294 0.027 303.015);
  --destructive: oklch(0.405 0.139 34.076);
  --destructive-foreground: oklch(0.883 0.058 34.378);
  --ring: oklch(0.276 0.041 302.133);
  --chart-1: oklch(0.276 0.041 302.133);
  --chart-2: oklch(0.878 0.01 304.185);
  --chart-3: oklch(0.822 0.023 303.94);
  --chart-4: oklch(0.903 0.008 304.221);
  --chart-5: oklch(0.273 0.047 301.81);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.107 0.012 304.902);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.222 0.026 302.665);
  --muted-foreground: oklch(0.747 0.002 304.298);
  --popover: oklch(0.107 0.012 304.902);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.107 0.012 304.902);
  --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.276 0.041 302.133);
  --primary-foreground: oklch(0.804 0.039 303.647);
  --secondary: oklch(0.269 0.017 303.431);
  --secondary-foreground: oklch(0.801 0.02 303.994);
  --accent: oklch(0.334 0.044 302.42);
  --accent-foreground: oklch(0.862 0.023 303.957);
  --destructive: oklch(0.643 0.217 34.195);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.276 0.041 302.133);
  --chart-1: oklch(0.276 0.041 302.133);
  --chart-2: oklch(0.269 0.017 303.431);
  --chart-3: oklch(0.334 0.044 302.42);
  --chart-4: oklch(0.299 0.02 303.39);
  --chart-5: oklch(0.273 0.047 301.81);
}