Vital for shadcn/ui

Vital is a shadcn/ui theme built around a muted blue primary color (#4b5d71) with muted indigo accents (#4d4b71). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted blue primary (#4b5d71) on a neutral background (#030507).

Color palette

TokenLightDark
Background
#ffffffwhite
#030507black
Foreground
#010204black
#f9fafaghostwhite
Card
#ffffffwhite
#030507black
Card foreground
#010204black
#f9fafaghostwhite
Popover
#ffffffwhite
#030507black
Popover foreground
#010204black
#f9fafaghostwhite
Primary
#4b5d71dimgray
#4b5d71dimgray
Primary foreground
#f6f7f9whitesmoke
#f6f7f9whitesmoke
Secondary
#4b7071dimgray
#4b7071dimgray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dde4e4gainsboro
#1b2222black
Muted foreground
#49595adarkslategray
#a5b5b6darkgray
Accent
#4d4b71darkslateblue
#4d4b71darkslateblue
Accent foreground
#f6f6f9whitesmoke
#f6f6f9whitesmoke
Destructive
#d1210afirebrick
#f5452etomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4b5d71dimgray
#4b5d71dimgray

Contrast

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

Light mode
Text on background20.75:1AAA
Text on card20.75:1AAA
Primary button6.29:1AA
Secondary button5.44:1AA
Muted text5.67:1AA
Accent7.56:1AAA
Destructive5.32:1AA
Dark mode
Text on background19.51:1AAA
Text on card19.51:1AAA
Primary button6.29:1AA
Secondary button5.44:1AA
Muted text7.62:1AAA
Accent7.56:1AAA
Destructive3.63:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.088 0.011 242.608);
  --muted: oklch(0.913 0.007 199.501);
  --muted-foreground: oklch(0.452 0.02 199.056);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.088 0.011 242.608);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.088 0.011 242.608);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.472 0.039 252.036);
  --primary-foreground: oklch(0.976 0.003 251.473);
  --secondary: oklch(0.518 0.041 198.676);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.432 0.062 285.024);
  --accent-foreground: oklch(0.974 0.004 287.862);
  --destructive: oklch(0.553 0.211 30.823);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.472 0.039 252.036);
  --chart-1: oklch(0.472 0.039 252.036);
  --chart-2: oklch(0.518 0.041 198.676);
  --chart-3: oklch(0.432 0.062 285.024);
  --chart-4: oklch(0.548 0.044 198.671);
  --chart-5: oklch(0.471 0.045 252.124);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.113 0.008 246.326);
  --foreground: oklch(0.984 0.001 251.458);
  --muted: oklch(0.244 0.009 199.11);
  --muted-foreground: oklch(0.761 0.018 199.301);
  --popover: oklch(0.113 0.008 246.326);
  --popover-foreground: oklch(0.984 0.001 251.458);
  --card: oklch(0.113 0.008 246.326);
  --card-foreground: oklch(0.984 0.001 251.458);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.472 0.039 252.036);
  --primary-foreground: oklch(0.976 0.003 251.473);
  --secondary: oklch(0.518 0.041 198.676);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.432 0.062 285.024);
  --accent-foreground: oklch(0.974 0.004 287.862);
  --destructive: oklch(0.645 0.216 30.942);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.472 0.039 252.036);
  --chart-1: oklch(0.472 0.039 252.036);
  --chart-2: oklch(0.518 0.041 198.676);
  --chart-3: oklch(0.432 0.062 285.024);
  --chart-4: oklch(0.548 0.044 198.671);
  --chart-5: oklch(0.471 0.045 252.124);
}