Parent for shadcn/ui

Parent is a shadcn/ui theme built around a vivid yellow primary color (#8e620b) with muted light yellow accents (#dcd5c7). The light mode uses a neutral background (#fdfbf7). Dark mode keeps the vivid yellow primary (#8e620b) on a yellow-tinted background (#0e0b07).

Color palette

TokenLightDark
Background
#fdfbf7snow
#0e0b07black
Foreground
#040301black
#fbfaf8snow
Card
#fcf9f3floralwhite
#110e08black
Card foreground
#000000black
#fdfdfcwhite
Popover
#fdfbf7snow
#0e0b07black
Popover foreground
#040301black
#fbfaf8snow
Primary
#8e620bsaddlebrown
#8e620bsaddlebrown
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#eae7e1gainsboro
#2b2822darkslategray
Secondary foreground
#595140darkolivegreen
#c7c2b8silver
Muted
#f1ebe0beige
#1f1a0eblack
Muted foreground
#504e49darkslategray
#b6b4afdarkgray
Accent
#dcd5c7lightgrey
#463e30darkslategray
Accent foreground
#453c2bdarkslategray
#dcd6cblightgrey
Destructive
#782008maroon
#e63d0forangered
Destructive foreground
#fac6b7lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8e620bsaddlebrown
#8e620bsaddlebrown

Contrast

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

Light mode
Text on background19.92:1AAA
Text on card19.95:1AAA
Primary button5.38:1AA
Secondary button6.34:1AA
Muted text6.99:1AA
Accent7.40:1AAA
Destructive6.89:1AA
Dark mode
Text on background18.79:1AAA
Text on card18.89:1AAA
Primary button5.38:1AA
Secondary button8.30:1AAA
Muted text8.36:1AAA
Accent7.27:1AAA
Destructive4.15:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.006 84.566);
  --foreground: oklch(0.098 0.011 90.26);
  --muted: oklch(0.941 0.016 84.587);
  --muted-foreground: oklch(0.424 0.009 84.59);
  --popover: oklch(0.988 0.006 84.566);
  --popover-foreground: oklch(0.098 0.011 90.26);
  --card: oklch(0.982 0.008 84.572);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.529 0.107 77.35);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.928 0.008 84.572);
  --secondary-foreground: oklch(0.437 0.028 84.505);
  --accent: oklch(0.874 0.021 84.592);
  --accent-foreground: oklch(0.362 0.03 84.355);
  --destructive: oklch(0.383 0.126 35.116);
  --destructive-foreground: oklch(0.868 0.064 35.982);
  --ring: oklch(0.529 0.107 77.35);
  --chart-1: oklch(0.529 0.107 77.35);
  --chart-2: oklch(0.928 0.008 84.572);
  --chart-3: oklch(0.874 0.021 84.592);
  --chart-4: oklch(0.95 0.005 84.566);
  --chart-5: oklch(0.534 0.109 76.804);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.153 0.011 86.134);
  --foreground: oklch(0.986 0.003 84.559);
  --muted: oklch(0.22 0.022 84.144);
  --muted-foreground: oklch(0.77 0.008 84.575);
  --popover: oklch(0.153 0.011 86.134);
  --popover-foreground: oklch(0.986 0.003 84.559);
  --card: oklch(0.166 0.013 84.74);
  --card-foreground: oklch(0.993 0.001 84.555);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.529 0.107 77.35);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.277 0.012 84.58);
  --secondary-foreground: oklch(0.815 0.015 84.588);
  --accent: oklch(0.368 0.026 84.459);
  --accent-foreground: oklch(0.879 0.016 84.588);
  --destructive: oklch(0.611 0.211 34.368);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.529 0.107 77.35);
  --chart-1: oklch(0.529 0.107 77.35);
  --chart-2: oklch(0.277 0.012 84.58);
  --chart-3: oklch(0.368 0.026 84.459);
  --chart-4: oklch(0.309 0.014 84.576);
  --chart-5: oklch(0.534 0.109 76.804);
}