Grandchild for shadcn/ui

Grandchild is a shadcn/ui theme built around a vivid light purple primary color (#e6a2fb) with vivid light teal accents (#a2fbe6). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid light purple primary (#e6a2fb) on a purple-tinted background (#0d0410).

Color palette

TokenLightDark
Background
#ffffffwhite
#0d0410black
Foreground
#0a030dblack
#faf9fbghostwhite
Card
#ffffffwhite
#0d0410black
Card foreground
#0a030dblack
#faf9fbghostwhite
Popover
#ffffffwhite
#0d0410black
Popover foreground
#0a030dblack
#faf9fbghostwhite
Primary
#e6a2fbplum
#e6a2fbplum
Primary foreground
#500467indigo
#500467indigo
Secondary
#fbe6a2navajowhite
#fbe6a2navajowhite
Secondary foreground
#675004saddlebrown
#675004saddlebrown
Muted
#f1eddfbeige
#201c0eblack
Muted foreground
#6e6a5edimgray
#a19d91darkgray
Accent
#a2fbe6paleturquoise
#a2fbe6paleturquoise
Accent foreground
#000504black
#000504black
Destructive
#c02e11firebrick
#eb401eorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e6a2fbplum
#e6a2fbplum

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.03:1AAA
Secondary button6.23:1AA
Muted text4.61:1AA
Accent17.09:1AAA
Destructive5.75:1AA
Dark mode
Text on background19.16:1AAA
Text on card19.16:1AAA
Primary button7.03:1AAA
Secondary button6.23:1AA
Muted text6.28:1AA
Accent17.09:1AAA
Destructive3.96:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.119 0.032 320.104);
  --muted: oklch(0.945 0.019 92.846);
  --muted-foreground: oklch(0.525 0.02 92.978);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.119 0.032 320.104);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.119 0.032 320.104);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.808 0.141 318.111);
  --primary-foreground: oklch(0.323 0.154 315.618);
  --secondary: oklch(0.927 0.089 93.163);
  --secondary-foreground: oklch(0.442 0.088 88.964);
  --accent: oklch(0.926 0.091 177.768);
  --accent-foreground: oklch(0.103 0.017 180.943);
  --destructive: oklch(0.531 0.187 32.728);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.808 0.141 318.111);
  --chart-1: oklch(0.808 0.141 318.111);
  --chart-2: oklch(0.927 0.089 93.163);
  --chart-3: oklch(0.926 0.091 177.768);
  --chart-4: oklch(0.938 0.076 93.166);
  --chart-5: oklch(0.807 0.146 318.1);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.134 0.032 319.006);
  --foreground: oklch(0.984 0.003 318.327);
  --muted: oklch(0.226 0.026 93.097);
  --muted-foreground: oklch(0.697 0.018 92.896);
  --popover: oklch(0.134 0.032 319.006);
  --popover-foreground: oklch(0.984 0.003 318.327);
  --card: oklch(0.134 0.032 319.006);
  --card-foreground: oklch(0.984 0.003 318.327);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.808 0.141 318.111);
  --primary-foreground: oklch(0.323 0.154 315.618);
  --secondary: oklch(0.927 0.089 93.163);
  --secondary-foreground: oklch(0.442 0.088 88.964);
  --accent: oklch(0.926 0.091 177.768);
  --accent-foreground: oklch(0.103 0.017 180.943);
  --destructive: oklch(0.624 0.213 32.932);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.808 0.141 318.111);
  --chart-1: oklch(0.808 0.141 318.111);
  --chart-2: oklch(0.927 0.089 93.163);
  --chart-3: oklch(0.926 0.091 177.768);
  --chart-4: oklch(0.938 0.076 93.166);
  --chart-5: oklch(0.807 0.146 318.1);
}