Grandpa for shadcn/ui

Grandpa is a shadcn/ui theme built around a near-black primary color (#000000) with neutral gray accents (#d1cccc). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#000000) on a neutral background (#040101).

Color palette

TokenLightDark
Background
#ffffffwhite
#040101black
Foreground
#0d0303black
#ffffffwhite
Card
#ffffffwhite
#040101black
Card foreground
#0d0303black
#ffffffwhite
Popover
#ffffffwhite
#040101black
Popover foreground
#0d0303black
#ffffffwhite
Primary
#000000black
#000000black
Primary foreground
#999999darkgray
#999999darkgray
Secondary
#d1cccclightgrey
#352c2cdarkslategray
Secondary foreground
#383333darkslategray
#cfc4c4silver
Muted
#e8c9c9thistle
#361717black
Muted foreground
#5b5757dimgray
#a8a4a4darkgray
Accent
#d1cccclightgrey
#352c2cdarkslategray
Accent foreground
#383333darkslategray
#cfc4c4silver
Destructive
#cb4101chocolate
#e44901orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#000000black
#000000black

Contrast

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

Light mode
Text on background20.35:1AAA
Text on card20.35:1AAA
Primary button7.37:1AAA
Secondary button7.83:1AAA
Muted text4.64:1AA
Accent7.83:1AAA
Destructive4.88:1AA
Dark mode
Text on background20.78:1AAA
Text on card20.78:1AAA
Primary button7.37:1AAA
Secondary button8.00:1AAA
Muted text6.60:1AA
Accent8.00:1AAA
Destructive3.98:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.116 0.025 21.743);
  --muted: oklch(0.863 0.035 17.842);
  --muted-foreground: oklch(0.462 0.005 17.324);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.116 0.025 21.743);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.116 0.025 21.743);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0 0 0);
  --primary-foreground: oklch(0.683 0 180);
  --secondary: oklch(0.849 0.005 17.263);
  --secondary-foreground: oklch(0.326 0.008 17.551);
  --accent: oklch(0.849 0.005 17.263);
  --accent-foreground: oklch(0.326 0.008 17.551);
  --destructive: oklch(0.568 0.184 38.449);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0 0 0);
  --chart-1: oklch(0 0 0);
  --chart-2: oklch(0.849 0.005 17.263);
  --chart-3: oklch(0.849 0.005 17.263);
  --chart-4: oklch(0.874 0.004 17.243);
  --chart-5: oklch(0 0 0);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.082 0.015 20.789);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.249 0.049 21.206);
  --muted-foreground: oklch(0.722 0.004 17.252);
  --popover: oklch(0.082 0.015 20.789);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.082 0.015 20.789);
  --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 0 0);
  --primary-foreground: oklch(0.683 0 180);
  --secondary: oklch(0.302 0.014 17.971);
  --secondary-foreground: oklch(0.829 0.012 17.399);
  --accent: oklch(0.302 0.014 17.971);
  --accent-foreground: oklch(0.829 0.012 17.399);
  --destructive: oklch(0.62 0.202 38.17);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0 0 0);
  --chart-1: oklch(0 0 0);
  --chart-2: oklch(0.302 0.014 17.971);
  --chart-3: oklch(0.302 0.014 17.971);
  --chart-4: oklch(0.331 0.016 18);
  --chart-5: oklch(0 0 0);
}