Afterlife for shadcn/ui

Afterlife is a shadcn/ui theme built around a light green primary color (#e3e6cb) with light green accents (#d6e6cb). The light mode uses a neutral background (#ffffff). Dark mode keeps the light green primary (#e3e6cb) on a green-tinted background (#0a0b05).

Color palette

TokenLightDark
Background
#ffffffwhite
#0a0b05black
Foreground
#080901black
#ffffffwhite
Card
#fcfcfcsnow
#0e0e06black
Card foreground
#040401black
#ffffffwhite
Popover
#ffffffwhite
#0a0b05black
Popover foreground
#080901black
#ffffffwhite
Primary
#e3e6cbgainsboro
#e3e6cbgainsboro
Primary foreground
#525629darkolivegreen
#525629darkolivegreen
Secondary
#e6dbcbgainsboro
#e6dbcbgainsboro
Secondary foreground
#564429darkolivegreen
#564429darkolivegreen
Muted
#eee5d8antiquewhite
#271e11black
Muted foreground
#4d473ddarkslategray
#c2bcb2silver
Accent
#d6e6cbgainsboro
#d6e6cbgainsboro
Accent foreground
#3b5629darkolivegreen
#3b5629darkolivegreen
Destructive
#6d2108maroon
#e44611orangered
Destructive foreground
#f9c1aelightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e3e6cbgainsboro
#e3e6cbgainsboro

Contrast

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

Light mode
Text on background20.00:1AAA
Text on card20.08:1AAA
Primary button6.05:1AA
Secondary button6.83:1AA
Muted text7.37:1AAA
Accent6.30:1AA
Destructive7.06:1AAA
Dark mode
Text on background19.77:1AAA
Text on card19.34:1AAA
Primary button6.05:1AA
Secondary button6.83:1AA
Muted text8.67:1AAA
Accent6.30:1AA
Destructive4.06:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.134 0.023 112.664);
  --muted: oklch(0.926 0.02 78.229);
  --muted-foreground: oklch(0.399 0.018 78.07);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.134 0.023 112.664);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.106 0.018 112.664);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.916 0.036 111.736);
  --primary-foreground: oklch(0.438 0.066 113.822);
  --secondary: oklch(0.897 0.025 78.198);
  --secondary-foreground: oklch(0.399 0.047 76.866);
  --accent: oklch(0.906 0.04 132.695);
  --accent-foreground: oklch(0.42 0.076 134.072);
  --destructive: oklch(0.365 0.113 37.176);
  --destructive-foreground: oklch(0.856 0.07 39.231);
  --ring: oklch(0.916 0.036 111.736);
  --chart-1: oklch(0.916 0.036 111.736);
  --chart-2: oklch(0.897 0.025 78.198);
  --chart-3: oklch(0.906 0.04 132.695);
  --chart-4: oklch(0.918 0.02 78.23);
  --chart-5: oklch(0.919 0.039 111.793);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.145 0.015 112.147);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.242 0.027 77.11);
  --muted-foreground: oklch(0.797 0.016 78.239);
  --popover: oklch(0.145 0.015 112.147);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.161 0.018 112.719);
  --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.916 0.036 111.736);
  --primary-foreground: oklch(0.438 0.066 113.822);
  --secondary: oklch(0.897 0.025 78.198);
  --secondary-foreground: oklch(0.399 0.047 76.866);
  --accent: oklch(0.906 0.04 132.695);
  --accent-foreground: oklch(0.42 0.076 134.072);
  --destructive: oklch(0.615 0.202 36.183);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.916 0.036 111.736);
  --chart-1: oklch(0.916 0.036 111.736);
  --chart-2: oklch(0.897 0.025 78.198);
  --chart-3: oklch(0.906 0.04 132.695);
  --chart-4: oklch(0.918 0.02 78.23);
  --chart-5: oklch(0.919 0.039 111.793);
}