Family for shadcn/ui

Family is a shadcn/ui theme built around a near-black primary color (#000000) with near-black accents (#000000). The light mode uses a neutral background (#fcf8f8). Dark mode keeps the near-black primary (#000000) on a neutral background (#080202).

Color palette

TokenLightDark
Background
#fcf8f8snow
#080202black
Foreground
#050101black
#fcf8f8snow
Card
#fbf4f4lavenderblush
#0c0303black
Card foreground
#000000black
#fdfcfcsnow
Popover
#fbf4f4lavenderblush
#0c0303black
Popover foreground
#000000black
#fdfcfcsnow
Primary
#000000black
#000000black
Primary foreground
#999999darkgray
#999999darkgray
Secondary
#000000black
#000000black
Secondary foreground
#999999darkgray
#999999darkgray
Muted
#ede3e3mistyrose
#1c1212black
Muted foreground
#483d3ddarkslategray
#c2b7b7silver
Accent
#000000black
#000000black
Accent foreground
#999999darkgray
#999999darkgray
Destructive
#90170edarkred
#e9291ccrimson
Destructive foreground
#fbd8d5mistyrose
#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 background19.65:1AAA
Text on card19.32:1AAA
Primary button7.37:1AAA
Secondary button7.37:1AAA
Muted text8.30:1AAA
Accent7.37:1AAA
Destructive6.87:1AA
Dark mode
Text on background19.52:1AAA
Text on card19.89:1AAA
Primary button7.37:1AAA
Secondary button7.37:1AAA
Muted text9.39:1AAA
Accent7.37:1AAA
Destructive4.38:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.005 17.241);
  --foreground: oklch(0.078 0.021 23.431);
  --muted: oklch(0.924 0.011 17.356);
  --muted-foreground: oklch(0.371 0.015 17.839);
  --popover: oklch(0.972 0.007 17.284);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.972 0.007 17.284);
  --card-foreground: oklch(0 0 0);
  --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 0 0);
  --secondary-foreground: oklch(0.683 0 180);
  --accent: oklch(0 0 0);
  --accent-foreground: oklch(0.683 0 180);
  --destructive: oklch(0.422 0.157 29.519);
  --destructive-foreground: oklch(0.91 0.039 22.748);
  --ring: oklch(0 0 0);
  --chart-1: oklch(0 0 0);
  --chart-2: oklch(0 0 0);
  --chart-3: oklch(0 0 0);
  --chart-4: oklch(0.132 0 165.964);
  --chart-5: oklch(0 0 0);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.103 0.019 20.998);
  --foreground: oklch(0.982 0.004 17.224);
  --muted: oklch(0.195 0.017 18.715);
  --muted-foreground: oklch(0.789 0.012 17.412);
  --popover: oklch(0.118 0.022 21.037);
  --popover-foreground: oklch(0.991 0.002 17.191);
  --card: oklch(0.118 0.022 21.037);
  --card-foreground: oklch(0.991 0.002 17.191);
  --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 0 0);
  --secondary-foreground: oklch(0.683 0 180);
  --accent: oklch(0 0 0);
  --accent-foreground: oklch(0.683 0 180);
  --destructive: oklch(0.601 0.225 29.579);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0 0 0);
  --chart-1: oklch(0 0 0);
  --chart-2: oklch(0 0 0);
  --chart-3: oklch(0 0 0);
  --chart-4: oklch(0.132 0 165.964);
  --chart-5: oklch(0 0 0);
}