Grandson for shadcn/ui

Grandson is a shadcn/ui theme built around a light purple primary color (#fbeffb) with light teal accents (#effbfb). The light mode uses a neutral background (#ffffff). Dark mode keeps the light purple primary (#fbeffb) on a neutral background (#080208).

Color palette

TokenLightDark
Background
#ffffffwhite
#080208black
Foreground
#120212black
#faf5faghostwhite
Card
#fcfcfcsnow
#0c040bblack
Card foreground
#0e020dblack
#fcf8fcsnow
Popover
#ffffffwhite
#080208black
Popover foreground
#120212black
#faf5faghostwhite
Primary
#fbeffblavenderblush
#fbeffblavenderblush
Primary foreground
#922690darkmagenta
#922690darkmagenta
Secondary
#fbfbeffloralwhite
#fbfbeffloralwhite
Secondary foreground
#404111darkolivegreen
#404111darkolivegreen
Muted
#dfdfd8gainsboro
#272720darkslategray
Muted foreground
#4c4c42darkslategray
#bcbdb3silver
Accent
#effbfbaliceblue
#effbfbaliceblue
Accent foreground
#114041darkslategray
#114041darkslategray
Destructive
#c82f04firebrick
#fb6237tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fbeffblavenderblush
#fbeffblavenderblush

Contrast

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

Light mode
Text on background20.13:1AAA
Text on card19.88:1AAA
Primary button6.47:1AA
Secondary button10.14:1AAA
Muted text6.47:1AA
Accent10.80:1AAA
Destructive5.44:1AA
Dark mode
Text on background19.04:1AAA
Text on card19.27:1AAA
Primary button6.47:1AA
Secondary button10.14:1AAA
Muted text7.89:1AAA
Accent10.80:1AAA
Destructive6.88:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.137 0.048 328.382);
  --muted: oklch(0.901 0.01 107.363);
  --muted-foreground: oklch(0.415 0.016 107.864);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.137 0.048 328.382);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.121 0.042 328.279);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.964 0.02 326.222);
  --primary-foreground: oklch(0.481 0.186 328.726);
  --secondary: oklch(0.984 0.016 107.46);
  --secondary-foreground: oklch(0.363 0.067 110.255);
  --accent: oklch(0.978 0.012 198.173);
  --accent-foreground: oklch(0.341 0.05 196.704);
  --destructive: oklch(0.545 0.195 33.827);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.964 0.02 326.222);
  --chart-1: oklch(0.964 0.02 326.222);
  --chart-2: oklch(0.984 0.016 107.46);
  --chart-3: oklch(0.978 0.012 198.173);
  --chart-4: oklch(0.996 0.004 107.242);
  --chart-5: oklch(0.964 0.021 326.23);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.109 0.023 327.461);
  --foreground: oklch(0.975 0.008 326.124);
  --muted: oklch(0.271 0.013 108.005);
  --muted-foreground: oklch(0.794 0.014 107.485);
  --popover: oklch(0.109 0.023 327.461);
  --popover-foreground: oklch(0.975 0.008 326.124);
  --card: oklch(0.125 0.027 327.503);
  --card-foreground: oklch(0.983 0.006 326.1);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.964 0.02 326.222);
  --primary-foreground: oklch(0.481 0.186 328.726);
  --secondary: oklch(0.984 0.016 107.46);
  --secondary-foreground: oklch(0.363 0.067 110.255);
  --accent: oklch(0.978 0.012 198.173);
  --accent-foreground: oklch(0.341 0.05 196.704);
  --destructive: oklch(0.687 0.196 36.042);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.964 0.02 326.222);
  --chart-1: oklch(0.964 0.02 326.222);
  --chart-2: oklch(0.984 0.016 107.46);
  --chart-3: oklch(0.978 0.012 198.173);
  --chart-4: oklch(0.996 0.004 107.242);
  --chart-5: oklch(0.964 0.021 326.23);
}