Grandchild for shadcn/ui

Grandchild is a shadcn/ui theme built around a neutral gray primary color (#798180) with muted teal accents (#aacbca). The light mode uses a neutral background (#f8fcfc). Dark mode keeps the neutral gray primary (#798180) on a teal-tinted background (#030c0c).

Color palette

TokenLightDark
Background
#f8fcfcmintcream
#030c0cblack
Foreground
#041110black
#ffffffwhite
Card
#f4fafamintcream
#041010black
Card foreground
#030d0cblack
#ffffffwhite
Popover
#f8fcfcmintcream
#030c0cblack
Popover foreground
#041110black
#ffffffwhite
Primary
#798180gray
#798180gray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#c6d7d7lightgrey
#1a1e1eblack
Secondary foreground
#2c3f3fdarkslategray
#b1b9b9silver
Muted
#eceeeewhitesmoke
#111313black
Muted foreground
#4c6160dimgray
#9eb3b2darkgray
Accent
#aacbcalightsteelblue
#273434darkslategray
Accent foreground
#192929darkslategray
#bfcfcesilver
Destructive
#9d2f07saddlebrown
#f66631tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#798180gray
#798180gray

Contrast

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

Light mode
Text on background18.58:1AAA
Text on card18.72:1AAA
Primary button3.99:1AA Large
Secondary button7.47:1AAA
Muted text5.66:1AA
Accent8.67:1AAA
Destructive7.42:1AAA
Dark mode
Text on background19.76:1AAA
Text on card19.29:1AAA
Primary button3.99:1AA Large
Secondary button8.43:1AAA
Muted text8.48:1AAA
Accent7.97:1AAA
Destructive6.87:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.004 194.706);
  --foreground: oklch(0.164 0.021 192.755);
  --muted: oklch(0.948 0.002 194.745);
  --muted-foreground: oklch(0.476 0.025 193.817);
  --popover: oklch(0.988 0.004 194.706);
  --popover-foreground: oklch(0.164 0.021 192.755);
  --card: oklch(0.982 0.007 194.664);
  --card-foreground: oklch(0.146 0.018 193.083);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.596 0.009 194.512);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.867 0.019 194.388);
  --secondary-foreground: oklch(0.352 0.025 193.507);
  --accent: oklch(0.817 0.035 193.993);
  --accent-foreground: oklch(0.267 0.021 193.317);
  --destructive: oklch(0.467 0.152 36.933);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.596 0.009 194.512);
  --chart-1: oklch(0.596 0.009 194.512);
  --chart-2: oklch(0.867 0.019 194.388);
  --chart-3: oklch(0.817 0.035 193.993);
  --chart-4: oklch(0.888 0.016 194.46);
  --chart-5: oklch(0.603 0.018 194.251);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.144 0.017 193.223);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.184 0.003 194.446);
  --muted-foreground: oklch(0.75 0.023 194.222);
  --popover: oklch(0.144 0.017 193.223);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.162 0.019 192.896);
  --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.596 0.009 194.512);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.23 0.005 194.384);
  --secondary-foreground: oklch(0.78 0.01 194.554);
  --accent: oklch(0.315 0.017 193.785);
  --accent-foreground: oklch(0.842 0.017 194.414);
  --destructive: oklch(0.685 0.189 39.113);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.596 0.009 194.512);
  --chart-1: oklch(0.596 0.009 194.512);
  --chart-2: oklch(0.23 0.005 194.384);
  --chart-3: oklch(0.315 0.017 193.785);
  --chart-4: oklch(0.264 0.006 194.354);
  --chart-5: oklch(0.603 0.018 194.251);
}