Fatherly for shadcn/ui

Fatherly is a shadcn/ui theme built around a neutral gray primary color (#7e7486) with neutral gray accents (#867485). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the neutral gray primary (#7e7486) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdfbfewhite
#000000black
Foreground
#0d0415black
#faf8fcghostwhite
Card
#fdfbfewhite
#000000black
Card foreground
#0d0415black
#faf8fcghostwhite
Popover
#fdfbfewhite
#000000black
Popover foreground
#0d0415black
#faf8fcghostwhite
Primary
#7e7486gray
#7e7486gray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#757486slategray
#757486slategray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f1f1f3whitesmoke
#0c0c0eblack
Muted foreground
#5e5d69dimgray
#9696a2darkgray
Accent
#867485gray
#867485gray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#931401darkred
#e92001red
Destructive foreground
#ffcfc7pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7e7486gray
#7e7486gray

Contrast

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

Light mode
Text on background19.53:1AAA
Text on card19.53:1AAA
Primary button4.43:1AA Large
Secondary button4.56:1AA
Muted text5.74:1AA
Accent4.32:1AA Large
Destructive6.39:1AA
Dark mode
Text on background19.89:1AAA
Text on card19.89:1AAA
Primary button4.43:1AA Large
Secondary button4.56:1AA
Muted text6.69:1AA
Accent4.32:1AA Large
Destructive4.47:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 309.752);
  --foreground: oklch(0.138 0.04 308.273);
  --muted: oklch(0.959 0.003 287.881);
  --muted-foreground: oklch(0.485 0.019 287.2);
  --popover: oklch(0.991 0.003 309.752);
  --popover-foreground: oklch(0.138 0.04 308.273);
  --card: oklch(0.991 0.003 309.752);
  --card-foreground: oklch(0.138 0.04 308.273);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.574 0.029 309.292);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.566 0.027 287.041);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.581 0.033 327.019);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.426 0.163 31.57);
  --destructive-foreground: oklch(0.893 0.056 28.381);
  --ring: oklch(0.574 0.029 309.292);
  --chart-1: oklch(0.574 0.029 309.292);
  --chart-2: oklch(0.566 0.027 287.041);
  --chart-3: oklch(0.581 0.033 327.019);
  --chart-4: oklch(0.593 0.026 287.111);
  --chart-5: oklch(0.568 0.041 309.072);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.982 0.005 309.736);
  --muted: oklch(0.154 0.005 287.345);
  --muted-foreground: oklch(0.676 0.017 287.457);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.982 0.005 309.736);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.982 0.005 309.736);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.574 0.029 309.292);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.566 0.027 287.041);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.581 0.033 327.019);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.597 0.232 30.955);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.574 0.029 309.292);
  --chart-1: oklch(0.574 0.029 309.292);
  --chart-2: oklch(0.566 0.027 287.041);
  --chart-3: oklch(0.581 0.033 327.019);
  --chart-4: oklch(0.593 0.026 287.111);
  --chart-5: oklch(0.568 0.041 309.072);
}