Young for shadcn/ui

Young is a shadcn/ui theme built around a neutral gray primary color (#2e312b) with neutral gray accents (#2e2b31). The light mode uses a neutral background (#fdfefb). Dark mode keeps the neutral gray primary (#2e312b) on a neutral background (#050703).

Color palette

TokenLightDark
Background
#fdfefbwhite
#050703black
Foreground
#050901black
#fcfdfcwhite
Card
#fdfefbwhite
#050703black
Card foreground
#050901black
#fcfdfcwhite
Popover
#fdfefbwhite
#050703black
Popover foreground
#050901black
#fcfdfcwhite
Primary
#2e312bdarkslategray
#2e312bdarkslategray
Primary foreground
#c7cac4silver
#c7cac4silver
Secondary
#2e2b31darkslategray
#2e2b31darkslategray
Secondary foreground
#c7c4casilver
#c7c4casilver
Muted
#edeaf0lavender
#120f15black
Muted foreground
#4a4a4adarkslategray
#b5b5b5silver
Accent
#2e2b31darkslategray
#2e2b31darkslategray
Accent foreground
#c7c4casilver
#c7c4casilver
Destructive
#bd2d14firebrick
#e23618orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2e312bdarkslategray
#2e312bdarkslategray

Contrast

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

Light mode
Text on background19.79:1AAA
Text on card19.79:1AAA
Primary button7.99:1AAA
Secondary button8.08:1AAA
Muted text7.44:1AAA
Accent8.08:1AAA
Destructive5.90:1AA
Dark mode
Text on background19.79:1AAA
Text on card19.79:1AAA
Primary button7.99:1AAA
Secondary button8.08:1AAA
Muted text9.28:1AAA
Accent8.08:1AAA
Destructive4.39:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.004 127.159);
  --foreground: oklch(0.131 0.027 125.779);
  --muted: oklch(0.941 0.009 306.999);
  --muted-foreground: oklch(0.409 0 190.305);
  --popover: oklch(0.995 0.004 127.159);
  --popover-foreground: oklch(0.131 0.027 125.779);
  --card: oklch(0.995 0.004 127.159);
  --card-foreground: oklch(0.131 0.027 125.779);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.307 0.01 127.529);
  --primary-foreground: oklch(0.835 0.01 127.257);
  --secondary: oklch(0.295 0.01 306.678);
  --secondary-foreground: oklch(0.823 0.01 306.965);
  --accent: oklch(0.295 0.01 306.678);
  --accent-foreground: oklch(0.823 0.01 306.965);
  --destructive: oklch(0.525 0.184 32.213);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.307 0.01 127.529);
  --chart-1: oklch(0.307 0.01 127.529);
  --chart-2: oklch(0.295 0.01 306.678);
  --chart-3: oklch(0.295 0.01 306.678);
  --chart-4: oklch(0.324 0.012 306.662);
  --chart-5: oklch(0.311 0.015 127.732);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.016 126.27);
  --foreground: oklch(0.993 0.001 127.121);
  --muted: oklch(0.174 0.013 306.188);
  --muted-foreground: oklch(0.773 0 180);
  --popover: oklch(0.125 0.016 126.27);
  --popover-foreground: oklch(0.993 0.001 127.121);
  --card: oklch(0.125 0.016 126.27);
  --card-foreground: oklch(0.993 0.001 127.121);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.307 0.01 127.529);
  --primary-foreground: oklch(0.835 0.01 127.257);
  --secondary: oklch(0.295 0.01 306.678);
  --secondary-foreground: oklch(0.823 0.01 306.965);
  --accent: oklch(0.295 0.01 306.678);
  --accent-foreground: oklch(0.823 0.01 306.965);
  --destructive: oklch(0.599 0.212 32.16);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.307 0.01 127.529);
  --chart-1: oklch(0.307 0.01 127.529);
  --chart-2: oklch(0.295 0.01 306.678);
  --chart-3: oklch(0.295 0.01 306.678);
  --chart-4: oklch(0.324 0.012 306.662);
  --chart-5: oklch(0.311 0.015 127.732);
}