Lifetime for shadcn/ui

Lifetime is a shadcn/ui theme built around a neutral gray primary color (#5a5a68) with neutral gray accents (#68685a). The light mode uses a neutral background (#f7f7fd). Dark mode keeps the neutral gray primary (#5a5a68) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f7f7fdghostwhite
#000000black
Foreground
#010104black
#f4f4fawhitesmoke
Card
#f7f7fdghostwhite
#000000black
Card foreground
#010104black
#f4f4fawhitesmoke
Popover
#f7f7fdghostwhite
#000000black
Popover foreground
#010104black
#f4f4fawhitesmoke
Primary
#5a5a68dimgray
#5a5a68dimgray
Primary foreground
#fafafasnow
#fafafasnow
Secondary
#68685adimgray
#68685adimgray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#eeeeddbeige
#222211black
Muted foreground
#68685adimgray
#a5a597darkgray
Accent
#68685adimgray
#68685adimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#962e08saddlebrown
#ed480corangered
Destructive foreground
#fdded3antiquewhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5a5a68dimgray
#5a5a68dimgray

Contrast

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

Light mode
Text on background19.47:1AAA
Text on card19.47:1AAA
Primary button6.48:1AA
Secondary button5.67:1AA
Muted text4.83:1AA
Accent5.67:1AA
Destructive6.15:1AA
Dark mode
Text on background19.16:1AAA
Text on card19.16:1AAA
Primary button6.48:1AA
Secondary button5.67:1AA
Muted text6.42:1AA
Accent5.67:1AA
Destructive3.77:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.977 0.009 286.238);
  --foreground: oklch(0.075 0.017 281.534);
  --muted: oklch(0.946 0.024 106.843);
  --muted-foreground: oklch(0.512 0.021 107.111);
  --popover: oklch(0.977 0.009 286.238);
  --popover-foreground: oklch(0.075 0.017 281.534);
  --card: oklch(0.977 0.009 286.238);
  --card-foreground: oklch(0.075 0.017 281.534);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.473 0.022 285.541);
  --primary-foreground: oklch(0.984 0.001 286.382);
  --secondary: oklch(0.512 0.021 107.111);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.512 0.021 107.111);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.455 0.146 37.204);
  --destructive-foreground: oklch(0.924 0.037 41.051);
  --ring: oklch(0.473 0.022 285.541);
  --chart-1: oklch(0.473 0.022 285.541);
  --chart-2: oklch(0.512 0.021 107.111);
  --chart-3: oklch(0.512 0.021 107.111);
  --chart-4: oklch(0.54 0.022 107.117);
  --chart-5: oklch(0.465 0.031 285.122);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.97 0.008 286.247);
  --muted: oklch(0.248 0.031 108.447);
  --muted-foreground: oklch(0.718 0.019 106.874);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.97 0.008 286.247);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.97 0.008 286.247);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.473 0.022 285.541);
  --primary-foreground: oklch(0.984 0.001 286.382);
  --secondary: oklch(0.512 0.021 107.111);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.512 0.021 107.111);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.634 0.21 36.514);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.473 0.022 285.541);
  --chart-1: oklch(0.473 0.022 285.541);
  --chart-2: oklch(0.512 0.021 107.111);
  --chart-3: oklch(0.512 0.021 107.111);
  --chart-4: oklch(0.54 0.022 107.117);
  --chart-5: oklch(0.465 0.031 285.122);
}