Earth for shadcn/ui

Earth is a shadcn/ui theme built around a yellow primary color (#c9a94a) with green accents (#a9c94a). The light mode uses a neutral background (#fcfbf8). Dark mode keeps the yellow primary (#c9a94a) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcfbf8snow
#000000black
Foreground
#080702black
#fcfbf8snow
Card
#faf9f5whitesmoke
#030303black
Card foreground
#040301black
#fdfdfcwhite
Popover
#faf9f5whitesmoke
#030303black
Popover foreground
#040301black
#fdfdfcwhite
Primary
#c9a94adarkkhaki
#c9a94adarkkhaki
Primary foreground
#000000black
#000000black
Secondary
#c96a4aindianred
#c96a4aindianred
Secondary foreground
#000000black
#000000black
Muted
#e5dedcgainsboro
#231c1ablack
Muted foreground
#70615cdimgray
#a3948frosybrown
Accent
#a9c94ayellowgreen
#a9c94ayellowgreen
Accent foreground
#2d3710darkgreen
#2d3710darkgreen
Destructive
#862c09saddlebrown
#f05214orangered
Destructive foreground
#fbd5c5peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c9a94adarkkhaki
#c9a94adarkkhaki

Contrast

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

Light mode
Text on background19.44:1AAA
Text on card19.52:1AAA
Primary button9.28:1AAA
Secondary button5.64:1AA
Muted text4.45:1AA Large
Accent6.69:1AA
Destructive6.47:1AA
Dark mode
Text on background20.29:1AAA
Text on card20.31:1AAA
Primary button9.28:1AAA
Secondary button5.64:1AA
Muted text5.72:1AA
Accent6.69:1AA
Destructive3.53:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.004 91.441);
  --foreground: oklch(0.127 0.018 97.039);
  --muted: oklch(0.906 0.008 39.451);
  --muted-foreground: oklch(0.505 0.021 39.306);
  --popover: oklch(0.981 0.005 91.457);
  --popover-foreground: oklch(0.101 0.014 97.039);
  --card: oklch(0.981 0.005 91.457);
  --card-foreground: oklch(0.101 0.014 97.039);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.746 0.119 90.763);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.628 0.129 39.019);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.788 0.156 122.011);
  --accent-foreground: oklch(0.318 0.06 121.756);
  --destructive: oklch(0.425 0.13 38.603);
  --destructive-foreground: oklch(0.901 0.048 42.741);
  --ring: oklch(0.746 0.119 90.763);
  --chart-1: oklch(0.746 0.119 90.763);
  --chart-2: oklch(0.628 0.129 39.019);
  --chart-3: oklch(0.788 0.156 122.011);
  --chart-4: oklch(0.651 0.12 39.111);
  --chart-5: oklch(0.753 0.124 90.567);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.988 0.004 91.444);
  --muted: oklch(0.235 0.012 39.286);
  --muted-foreground: oklch(0.678 0.02 39.352);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(0.994 0.002 91.426);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.994 0.002 91.426);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.746 0.119 90.763);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.628 0.129 39.019);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.788 0.156 122.011);
  --accent-foreground: oklch(0.318 0.06 121.756);
  --destructive: oklch(0.649 0.204 38.163);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.746 0.119 90.763);
  --chart-1: oklch(0.746 0.119 90.763);
  --chart-2: oklch(0.628 0.129 39.019);
  --chart-3: oklch(0.788 0.156 122.011);
  --chart-4: oklch(0.651 0.12 39.111);
  --chart-5: oklch(0.753 0.124 90.567);
}