Infancy for shadcn/ui

Infancy is a shadcn/ui theme built around a muted light green primary color (#f3f8f2) with muted green accents (#b9c3b7). The light mode uses a neutral background (#f7fdf6). Dark mode keeps the muted light green primary (#f3f8f2) on a neutral background (#030703).

Color palette

TokenLightDark
Background
#f7fdf6mintcream
#030703black
Foreground
#051202black
#f9fbf9mintcream
Card
#f7fdf6mintcream
#030703black
Card foreground
#051202black
#f9fbf9mintcream
Popover
#f7fdf6mintcream
#030703black
Popover foreground
#051202black
#f9fbf9mintcream
Primary
#f3f8f2whitesmoke
#f3f8f2whitesmoke
Primary foreground
#21341edarkslategray
#21341edarkslategray
Secondary
#cccdcblightgrey
#283027darkslategray
Secondary foreground
#333432darkslategray
#c0cbbesilver
Muted
#cee8c9lightgrey
#1c3617darkgreen
Muted foreground
#404540darkslategray
#bbbfbasilver
Accent
#b9c3b7silver
#395035darkslategray
Accent foreground
#212720black
#d6e2d4gainsboro
Destructive
#c62e0cfirebrick
#f13c13orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f3f8f2whitesmoke
#f3f8f2whitesmoke

Contrast

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

Light mode
Text on background18.66:1AAA
Text on card18.66:1AAA
Primary button12.35:1AAA
Secondary button7.81:1AAA
Muted text7.47:1AAA
Accent8.36:1AAA
Destructive5.55:1AA
Dark mode
Text on background19.45:1AAA
Text on card19.45:1AAA
Primary button12.35:1AAA
Secondary button8.11:1AAA
Muted text7.13:1AAA
Accent6.64:1AA
Destructive3.89:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.011 141.04);
  --foreground: oklch(0.164 0.042 139.117);
  --muted: oklch(0.904 0.049 140.946);
  --muted-foreground: oklch(0.384 0.011 141.005);
  --popover: oklch(0.989 0.011 141.04);
  --popover-foreground: oklch(0.164 0.042 139.117);
  --card: oklch(0.989 0.011 141.04);
  --card-foreground: oklch(0.164 0.042 139.117);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.973 0.009 141.046);
  --primary-foreground: oklch(0.301 0.046 140.769);
  --secondary: oklch(0.846 0.002 141.061);
  --secondary-foreground: oklch(0.322 0.002 141.051);
  --accent: oklch(0.805 0.02 141.011);
  --accent-foreground: oklch(0.265 0.014 140.949);
  --destructive: oklch(0.54 0.192 33.051);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.973 0.009 141.046);
  --chart-1: oklch(0.973 0.009 141.046);
  --chart-2: oklch(0.846 0.002 141.061);
  --chart-3: oklch(0.805 0.02 141.011);
  --chart-4: oklch(0.869 0.001 141.062);
  --chart-5: oklch(0.973 0.01 141.043);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.122 0.018 139.641);
  --foreground: oklch(0.986 0.003 141.059);
  --muted: oklch(0.301 0.062 140.729);
  --muted-foreground: oklch(0.801 0.009 141.041);
  --popover: oklch(0.122 0.018 139.641);
  --popover-foreground: oklch(0.986 0.003 141.059);
  --card: oklch(0.122 0.018 139.641);
  --card-foreground: oklch(0.986 0.003 141.059);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.973 0.009 141.046);
  --primary-foreground: oklch(0.301 0.046 140.769);
  --secondary: oklch(0.299 0.02 140.918);
  --secondary-foreground: oklch(0.829 0.021 141.009);
  --accent: oklch(0.403 0.052 140.804);
  --accent-foreground: oklch(0.901 0.023 141.009);
  --destructive: oklch(0.629 0.222 33.157);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.973 0.009 141.046);
  --chart-1: oklch(0.973 0.009 141.046);
  --chart-2: oklch(0.299 0.02 140.918);
  --chart-3: oklch(0.403 0.052 140.804);
  --chart-4: oklch(0.33 0.023 140.913);
  --chart-5: oklch(0.973 0.01 141.043);
}