World for shadcn/ui

World is a shadcn/ui theme built around a green primary color (#406930) with muted light green accents (#d2d8cf). The light mode uses a neutral background (#fcfefb). Dark mode keeps the green primary (#406930) on a green-tinted background (#081004).

Color palette

TokenLightDark
Background
#fcfefbwhite
#081004black
Foreground
#091603black
#ffffffwhite
Card
#f9fcf7mintcream
#091405black
Card foreground
#071203black
#ffffffwhite
Popover
#fcfefbwhite
#081004black
Popover foreground
#091603black
#ffffffwhite
Primary
#406930darkolivegreen
#406930darkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d2d8cflightgrey
#333432darkslategray
Secondary foreground
#384134darkslategray
#cccdcblightgrey
Muted
#f2f3f1whitesmoke
#0c0e0cblack
Muted foreground
#646a62dimgray
#979d95darkgray
Accent
#d2d8cflightgrey
#333432darkslategray
Accent foreground
#384134darkslategray
#cccdcblightgrey
Destructive
#881606darkred
#f42f15orangered
Destructive foreground
#fccbc5pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#406930darkolivegreen
#406930darkolivegreen

Contrast

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

Light mode
Text on background18.32:1AAA
Text on card18.54:1AAA
Primary button6.41:1AA
Secondary button7.34:1AAA
Muted text4.99:1AA
Accent7.34:1AAA
Destructive6.68:1AA
Dark mode
Text on background19.31:1AAA
Text on card18.80:1AAA
Primary button6.41:1AA
Secondary button7.85:1AAA
Muted text6.99:1AA
Accent7.85:1AAA
Destructive3.98:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.004 136.62);
  --foreground: oklch(0.182 0.042 136.17);
  --muted: oklch(0.963 0.003 136.618);
  --muted-foreground: oklch(0.517 0.015 136.694);
  --popover: oklch(0.994 0.004 136.62);
  --popover-foreground: oklch(0.182 0.042 136.17);
  --card: oklch(0.988 0.007 136.631);
  --card-foreground: oklch(0.165 0.037 135.407);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.476 0.097 137.544);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.876 0.015 136.66);
  --secondary-foreground: oklch(0.363 0.025 136.828);
  --accent: oklch(0.876 0.015 136.66);
  --accent-foreground: oklch(0.363 0.025 136.828);
  --destructive: oklch(0.406 0.151 31.044);
  --destructive-foreground: oklch(0.883 0.057 27.003);
  --ring: oklch(0.476 0.097 137.544);
  --chart-1: oklch(0.476 0.097 137.544);
  --chart-2: oklch(0.876 0.015 136.66);
  --chart-3: oklch(0.876 0.015 136.66);
  --chart-4: oklch(0.898 0.012 136.649);
  --chart-5: oklch(0.481 0.103 137.646);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.161 0.03 135.636);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.16 0.005 136.701);
  --muted-foreground: oklch(0.689 0.014 136.668);
  --popover: oklch(0.161 0.03 135.636);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.177 0.035 136.401);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.476 0.097 137.544);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.323 0.004 136.647);
  --secondary-foreground: oklch(0.847 0.003 136.62);
  --accent: oklch(0.323 0.004 136.647);
  --accent-foreground: oklch(0.847 0.003 136.62);
  --destructive: oklch(0.625 0.232 30.967);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.476 0.097 137.544);
  --chart-1: oklch(0.476 0.097 137.544);
  --chart-2: oklch(0.323 0.004 136.647);
  --chart-3: oklch(0.323 0.004 136.647);
  --chart-4: oklch(0.353 0.005 136.648);
  --chart-5: oklch(0.481 0.103 137.646);
}