Grandfather for shadcn/ui

Grandfather is a shadcn/ui theme built around a near-black primary color (#050005) with near-black accents (#050002). The light mode uses a neutral background (#fdf7fd). Dark mode keeps the near-black primary (#050005) on a neutral background (#040104).

Color palette

TokenLightDark
Background
#fdf7fdsnow
#040104black
Foreground
#150514black
#fdfcfdwhite
Card
#fcf3fcghostwhite
#070307black
Card foreground
#110410black
#ffffffwhite
Popover
#fdf7fdsnow
#040104black
Popover foreground
#150514black
#fdfcfdwhite
Primary
#050005black
#050005black
Primary foreground
#f245ecorchid
#f245ecorchid
Secondary
#030005black
#030005black
Secondary foreground
#d1a4f9plum
#d1a4f9plum
Muted
#ebe9eclavender
#151316black
Muted foreground
#454446darkslategray
#bab9bbsilver
Accent
#050002black
#050002black
Accent foreground
#f24596hotpink
#f24596hotpink
Destructive
#9e3a10saddlebrown
#d54f15chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#050005black
#050005black

Contrast

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

Light mode
Text on background18.68:1AAA
Text on card18.43:1AAA
Primary button6.77:1AA
Secondary button10.31:1AAA
Muted text8.00:1AAA
Accent6.01:1AA
Destructive6.84:1AA
Dark mode
Text on background20.26:1AAA
Text on card20.48:1AAA
Primary button6.77:1AA
Secondary button10.31:1AAA
Muted text9.48:1AAA
Accent6.01:1AA
Destructive4.22:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.01 326.628);
  --foreground: oklch(0.151 0.042 328.596);
  --muted: oklch(0.936 0.005 309.728);
  --muted-foreground: oklch(0.388 0.002 309.721);
  --popover: oklch(0.982 0.01 326.628);
  --popover-foreground: oklch(0.151 0.042 328.596);
  --card: oklch(0.973 0.015 326.673);
  --card-foreground: oklch(0.138 0.037 328.451);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.083 0.032 328.826);
  --primary-foreground: oklch(0.699 0.269 329.443);
  --secondary: oklch(0.074 0.029 312.794);
  --secondary-foreground: oklch(0.791 0.125 308.175);
  --accent: oklch(0.079 0.027 346.438);
  --accent-foreground: oklch(0.662 0.219 356.48);
  --destructive: oklch(0.484 0.142 40.123);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.083 0.032 328.826);
  --chart-1: oklch(0.083 0.032 328.826);
  --chart-2: oklch(0.074 0.029 312.794);
  --chart-3: oklch(0.079 0.027 346.438);
  --chart-4: oklch(0.12 0.049 309.89);
  --chart-5: oklch(0.082 0.033 328.906);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.088 0.015 327.642);
  --foreground: oklch(0.992 0.002 326.561);
  --muted: oklch(0.189 0.008 309.369);
  --muted-foreground: oklch(0.788 0.002 309.759);
  --popover: oklch(0.088 0.015 327.642);
  --popover-foreground: oklch(0.992 0.002 326.561);
  --card: oklch(0.11 0.018 327.642);
  --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.083 0.032 328.826);
  --primary-foreground: oklch(0.699 0.269 329.443);
  --secondary: oklch(0.074 0.029 312.794);
  --secondary-foreground: oklch(0.791 0.125 308.175);
  --accent: oklch(0.079 0.027 346.438);
  --accent-foreground: oklch(0.662 0.219 356.48);
  --destructive: oklch(0.602 0.181 39.699);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.083 0.032 328.826);
  --chart-1: oklch(0.083 0.032 328.826);
  --chart-2: oklch(0.074 0.029 312.794);
  --chart-3: oklch(0.079 0.027 346.438);
  --chart-4: oklch(0.12 0.049 309.89);
  --chart-5: oklch(0.082 0.033 328.906);
}