Ear for shadcn/ui

Ear is a shadcn/ui theme built around a light yellow primary color (#f9f8e6) with muted light yellow accents (#d2d1c6). The light mode uses a neutral background (#ffffff). Dark mode keeps the light yellow primary (#f9f8e6) on a yellow-tinted background (#100f05).

Color palette

TokenLightDark
Background
#ffffffwhite
#100f05black
Foreground
#090801black
#fdfdfcwhite
Card
#ffffffwhite
#100f05black
Card foreground
#090801black
#fdfdfcwhite
Popover
#ffffffwhite
#100f05black
Popover foreground
#090801black
#fdfdfcwhite
Primary
#f9f8e6oldlace
#f9f8e6oldlace
Primary foreground
#3a360edarkolivegreen
#3a360edarkolivegreen
Secondary
#e6e6e5gainsboro
#24231eblack
Secondary foreground
#4e4e4bdarkslategray
#c0bfb5silver
Muted
#eeede2beige
#1d1c11black
Muted foreground
#535350darkslategray
#afafacdarkgray
Accent
#d2d1c6lightgrey
#343327darkslategray
Accent foreground
#39382ddarkslategray
#cfcdbfsilver
Destructive
#662a0bsaddlebrown
#eb7a3dcoral
Destructive foreground
#f6c6acwheat
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f9f8e6oldlace
#f9f8e6oldlace

Contrast

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

Light mode
Text on background20.06:1AAA
Text on card20.06:1AAA
Primary button11.41:1AAA
Secondary button6.68:1AA
Muted text6.55:1AA
Accent7.70:1AAA
Destructive7.14:1AAA
Dark mode
Text on background18.92:1AAA
Text on card18.92:1AAA
Primary button11.41:1AAA
Secondary button8.48:1AAA
Muted text7.80:1AAA
Accent7.93:1AAA
Destructive7.36:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.133 0.022 105.952);
  --muted: oklch(0.943 0.014 102.452);
  --muted-foreground: oklch(0.441 0.005 102.39);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.133 0.022 105.952);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.133 0.022 105.952);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.975 0.023 102.588);
  --primary-foreground: oklch(0.328 0.058 104.11);
  --secondary: oklch(0.925 0.001 102.234);
  --secondary-foreground: oklch(0.422 0.005 102.388);
  --accent: oklch(0.859 0.015 102.499);
  --accent-foreground: oklch(0.338 0.019 103.067);
  --destructive: oklch(0.365 0.095 44.835);
  --destructive-foreground: oklch(0.862 0.066 49.765);
  --ring: oklch(0.975 0.023 102.588);
  --chart-1: oklch(0.975 0.023 102.588);
  --chart-2: oklch(0.925 0.001 102.234);
  --chart-3: oklch(0.859 0.015 102.499);
  --chart-4: oklch(0.947 0.001 102.227);
  --chart-5: oklch(0.975 0.024 102.605);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.165 0.021 104.375);
  --foreground: oklch(0.993 0.001 102.232);
  --muted: oklch(0.223 0.019 103.468);
  --muted-foreground: oklch(0.753 0.004 102.304);
  --popover: oklch(0.165 0.021 104.375);
  --popover-foreground: oklch(0.993 0.001 102.232);
  --card: oklch(0.165 0.021 104.375);
  --card-foreground: oklch(0.993 0.001 102.232);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.975 0.023 102.588);
  --primary-foreground: oklch(0.328 0.058 104.11);
  --secondary: oklch(0.256 0.009 102.759);
  --secondary-foreground: oklch(0.802 0.014 102.493);
  --accent: oklch(0.319 0.02 103.162);
  --accent-foreground: oklch(0.847 0.02 102.583);
  --destructive: oklch(0.697 0.158 46.605);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.975 0.023 102.588);
  --chart-1: oklch(0.975 0.023 102.588);
  --chart-2: oklch(0.256 0.009 102.759);
  --chart-3: oklch(0.319 0.02 103.162);
  --chart-4: oklch(0.29 0.011 102.787);
  --chart-5: oklch(0.975 0.024 102.605);
}