Revitalisation for shadcn/ui

Revitalisation is a shadcn/ui theme built around a near-black primary color (#040803) with near-black accents (#070308). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#040803) on a green-tinted background (#050c03).

Color palette

TokenLightDark
Background
#ffffffwhite
#050c03black
Foreground
#071703black
#f7f9f6whitesmoke
Card
#ffffffwhite
#050c03black
Card foreground
#071703black
#f7f9f6whitesmoke
Popover
#ffffffwhite
#050c03black
Popover foreground
#071703black
#f7f9f6whitesmoke
Primary
#040803black
#040803black
Primary foreground
#4da136olivedrab
#4da136olivedrab
Secondary
#070308black
#070308black
Secondary foreground
#ba6ecfmediumorchid
#ba6ecfmediumorchid
Muted
#f4f0f5whitesmoke
#0e0a0fblack
Muted foreground
#4b484cdarkslategray
#b6b3b7silver
Accent
#070308black
#070308black
Accent foreground
#ba6ecfmediumorchid
#ba6ecfmediumorchid
Destructive
#772309maroon
#ed4512orangered
Destructive foreground
#fac7b8peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#040803black
#040803black

Contrast

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

Light mode
Text on background18.53:1AAA
Text on card18.53:1AAA
Primary button6.22:1AA
Secondary button6.08:1AA
Muted text7.98:1AAA
Accent6.08:1AA
Destructive6.90:1AA
Dark mode
Text on background18.69:1AAA
Text on card18.69:1AAA
Primary button6.22:1AA
Secondary button6.08:1AA
Muted text9.44:1AAA
Accent6.08:1AA
Destructive3.84:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.183 0.046 137.803);
  --muted: oklch(0.959 0.007 318.888);
  --muted-foreground: oklch(0.406 0.009 318.883);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.183 0.046 137.803);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.183 0.046 137.803);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.123 0.019 137.355);
  --primary-foreground: oklch(0.633 0.165 139.559);
  --secondary: oklch(0.107 0.021 320.572);
  --secondary-foreground: oklch(0.657 0.159 318.662);
  --accent: oklch(0.107 0.021 320.572);
  --accent-foreground: oklch(0.657 0.159 318.662);
  --destructive: oklch(0.384 0.122 36.103);
  --destructive-foreground: oklch(0.871 0.062 37.593);
  --ring: oklch(0.123 0.019 137.355);
  --chart-1: oklch(0.123 0.019 137.355);
  --chart-2: oklch(0.107 0.021 320.572);
  --chart-3: oklch(0.107 0.021 320.572);
  --chart-4: oklch(0.148 0.032 319.045);
  --chart-5: oklch(0.124 0.021 137.265);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.143 0.026 137.203);
  --foreground: oklch(0.979 0.004 138.892);
  --muted: oklch(0.154 0.011 318.863);
  --muted-foreground: oklch(0.77 0.007 318.887);
  --popover: oklch(0.143 0.026 137.203);
  --popover-foreground: oklch(0.979 0.004 138.892);
  --card: oklch(0.143 0.026 137.203);
  --card-foreground: oklch(0.979 0.004 138.892);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.123 0.019 137.355);
  --primary-foreground: oklch(0.633 0.165 139.559);
  --secondary: oklch(0.107 0.021 320.572);
  --secondary-foreground: oklch(0.657 0.159 318.662);
  --accent: oklch(0.107 0.021 320.572);
  --accent-foreground: oklch(0.657 0.159 318.662);
  --destructive: oklch(0.631 0.212 35.308);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.123 0.019 137.355);
  --chart-1: oklch(0.123 0.019 137.355);
  --chart-2: oklch(0.107 0.021 320.572);
  --chart-3: oklch(0.107 0.021 320.572);
  --chart-4: oklch(0.148 0.032 319.045);
  --chart-5: oklch(0.124 0.021 137.265);
}