Hatchling for shadcn/ui

Hatchling is a shadcn/ui theme built around a vivid indigo primary color (#4731f2) with muted light indigo accents (#cdcbd7). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid indigo primary (#4731f2) on a neutral background (#020104).

Color palette

TokenLightDark
Background
#ffffffwhite
#020104black
Foreground
#050311black
#ffffffwhite
Card
#ffffffwhite
#020104black
Card foreground
#050311black
#ffffffwhite
Popover
#ffffffwhite
#020104black
Popover foreground
#050311black
#ffffffwhite
Primary
#4731f2royalblue
#4731f2royalblue
Primary foreground
#f2f1fealiceblue
#f2f1fealiceblue
Secondary
#cdcbd7lightgrey
#252528darkslategray
Secondary foreground
#33313fdarkslategray
#bdbdc2silver
Muted
#e6e5eblavender
#15141ablack
Muted foreground
#49465ddarkslategray
#a5a2b9darkgray
Accent
#cdcbd7lightgrey
#252528darkslategray
Accent foreground
#33313fdarkslategray
#bdbdc2silver
Destructive
#79300csaddlebrown
#eb7033tomato
Destructive foreground
#f9d2bepeachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4731f2royalblue
#4731f2royalblue

Contrast

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

Light mode
Text on background20.43:1AAA
Text on card20.43:1AAA
Primary button6.28:1AA
Secondary button7.94:1AAA
Muted text7.23:1AAA
Accent7.94:1AAA
Destructive6.69:1AA
Dark mode
Text on background20.80:1AAA
Text on card20.80:1AAA
Primary button6.28:1AA
Secondary button8.18:1AAA
Muted text7.39:1AAA
Accent8.18:1AAA
Destructive6.89:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.115 0.036 287.296);
  --muted: oklch(0.924 0.008 291.615);
  --muted-foreground: oklch(0.407 0.038 289.939);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.115 0.036 287.296);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.115 0.036 287.296);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.492 0.265 275.648);
  --primary-foreground: oklch(0.962 0.018 291.425);
  --secondary: oklch(0.847 0.016 291.411);
  --secondary-foreground: oklch(0.32 0.026 290.208);
  --accent: oklch(0.847 0.016 291.411);
  --accent-foreground: oklch(0.32 0.026 290.208);
  --destructive: oklch(0.407 0.111 43.006);
  --destructive-foreground: oklch(0.89 0.051 48.121);
  --ring: oklch(0.492 0.265 275.648);
  --chart-1: oklch(0.492 0.265 275.648);
  --chart-2: oklch(0.847 0.016 291.411);
  --chart-3: oklch(0.847 0.016 291.411);
  --chart-4: oklch(0.873 0.014 291.485);
  --chart-5: oklch(0.49 0.272 274.875);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.079 0.014 289.888);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.195 0.012 290.594);
  --muted-foreground: oklch(0.722 0.033 290.905);
  --popover: oklch(0.079 0.014 289.888);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.079 0.014 289.888);
  --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.492 0.265 275.648);
  --primary-foreground: oklch(0.962 0.018 291.425);
  --secondary: oklch(0.265 0.006 291.375);
  --secondary-foreground: oklch(0.799 0.007 291.611);
  --accent: oklch(0.265 0.006 291.375);
  --accent-foreground: oklch(0.799 0.007 291.611);
  --destructive: oklch(0.682 0.169 44.44);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.492 0.265 275.648);
  --chart-1: oklch(0.492 0.265 275.648);
  --chart-2: oklch(0.265 0.006 291.375);
  --chart-3: oklch(0.265 0.006 291.375);
  --chart-4: oklch(0.295 0.007 291.356);
  --chart-5: oklch(0.49 0.272 274.875);
}