Grandmother for shadcn/ui

Grandmother is a shadcn/ui theme built around a near-black primary color (#1d1b1c) with near-black accents (#1b1d1d). The light mode uses a neutral background (#fdf6f8). Dark mode keeps the near-black primary (#1d1b1c) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdf6f8snow
#000000black
Foreground
#080204black
#fdfcfcsnow
Card
#fdf2f5lavenderblush
#030303black
Card foreground
#040102black
#ffffffwhite
Popover
#fdf2f5lavenderblush
#030303black
Popover foreground
#040102black
#ffffffwhite
Primary
#1d1b1cblack
#1d1b1cblack
Primary foreground
#b8b2b4silver
#b8b2b4silver
Secondary
#1b1d1dblack
#1b1d1dblack
Secondary foreground
#b2b8b6silver
#b2b8b6silver
Muted
#e4f1eelavender
#0e1b17black
Muted foreground
#57605edimgray
#9fa8a5darkgray
Accent
#1b1d1dblack
#1b1d1dblack
Accent foreground
#b2b8b6silver
#b2b8b6silver
Destructive
#882306darkred
#f43e0borangered
Destructive foreground
#fcd1c5peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1d1b1cblack
#1d1b1cblack

Contrast

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

Light mode
Text on background19.38:1AAA
Text on card18.99:1AAA
Primary button8.21:1AAA
Secondary button8.39:1AAA
Muted text5.59:1AA
Accent8.39:1AAA
Destructive6.57:1AA
Dark mode
Text on background20.50:1AAA
Text on card20.67:1AAA
Primary button8.21:1AAA
Secondary button8.39:1AAA
Muted text7.25:1AAA
Accent8.39:1AAA
Destructive3.80:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.008 359.01);
  --foreground: oklch(0.106 0.017 358.642);
  --muted: oklch(0.948 0.015 178.336);
  --muted-foreground: oklch(0.482 0.012 178.047);
  --popover: oklch(0.97 0.012 359.127);
  --popover-foreground: oklch(0.084 0.013 358.642);
  --card: oklch(0.97 0.012 359.127);
  --card-foreground: oklch(0.084 0.013 358.642);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.225 0.004 359.244);
  --primary-foreground: oklch(0.769 0.007 359.045);
  --secondary: oklch(0.229 0.004 178.329);
  --secondary-foreground: oklch(0.777 0.007 178.524);
  --accent: oklch(0.229 0.004 178.329);
  --accent-foreground: oklch(0.777 0.007 178.524);
  --destructive: oklch(0.417 0.141 34.759);
  --destructive-foreground: oklch(0.894 0.052 35.956);
  --ring: oklch(0.225 0.004 359.244);
  --chart-1: oklch(0.225 0.004 359.244);
  --chart-2: oklch(0.229 0.004 178.329);
  --chart-3: oklch(0.229 0.004 178.329);
  --chart-4: oklch(0.262 0.004 178.294);
  --chart-5: oklch(0.223 0.006 359.594);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.001 358.815);
  --muted: oklch(0.208 0.02 175.644);
  --muted-foreground: oklch(0.723 0.011 178.342);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.225 0.004 359.244);
  --primary-foreground: oklch(0.769 0.007 359.045);
  --secondary: oklch(0.229 0.004 178.329);
  --secondary-foreground: oklch(0.777 0.007 178.524);
  --accent: oklch(0.229 0.004 178.329);
  --accent-foreground: oklch(0.777 0.007 178.524);
  --destructive: oklch(0.635 0.223 34.021);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.225 0.004 359.244);
  --chart-1: oklch(0.225 0.004 359.244);
  --chart-2: oklch(0.229 0.004 178.329);
  --chart-3: oklch(0.229 0.004 178.329);
  --chart-4: oklch(0.262 0.004 178.294);
  --chart-5: oklch(0.223 0.006 359.594);
}