World for shadcn/ui

World is a shadcn/ui theme built around a neutral gray primary color (#828881) with neutral gray accents (#888182). The light mode uses a neutral background (#fbfefb). Dark mode keeps the neutral gray primary (#828881) on a neutral background (#020402).

Color palette

TokenLightDark
Background
#fbfefbwhite
#020402black
Foreground
#040c04black
#fcfdfcwhite
Card
#f7fdf7mintcream
#040703black
Card foreground
#030802black
#ffffffwhite
Popover
#f7fdf7mintcream
#040703black
Popover foreground
#030802black
#ffffffwhite
Primary
#828881gray
#828881gray
Primary foreground
#000000black
#000000black
Secondary
#818288gray
#818288gray
Secondary foreground
#000000black
#000000black
Muted
#e1e1e5gainsboro
#1a1a1eblack
Muted foreground
#4f4f4fdarkslategray
#b0b0b0darkgray
Accent
#888182gray
#888182gray
Accent foreground
#000000black
#000000black
Destructive
#751e0amaroon
#ef6343tomato
Destructive foreground
#f9c4b9lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#828881gray
#828881gray

Contrast

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

Light mode
Text on background19.52:1AAA
Text on card19.60:1AAA
Primary button5.79:1AA
Secondary button5.47:1AA
Muted text6.28:1AA
Accent5.50:1AA
Destructive6.99:1AA
Dark mode
Text on background20.22:1AAA
Text on card20.25:1AAA
Primary button5.79:1AA
Secondary button5.47:1AA
Muted text7.98:1AAA
Accent5.50:1AA
Destructive6.51:1AA

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.005 142.095);
  --foreground: oklch(0.141 0.025 140.478);
  --muted: oklch(0.911 0.005 280.238);
  --muted-foreground: oklch(0.428 0 180);
  --popover: oklch(0.988 0.01 142.077);
  --popover-foreground: oklch(0.123 0.022 140.448);
  --card: oklch(0.988 0.01 142.077);
  --card-foreground: oklch(0.123 0.022 140.448);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.62 0.013 142.039);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.607 0.01 280.075);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.61 0.009 9.258);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.376 0.125 33.729);
  --destructive-foreground: oklch(0.865 0.063 32.865);
  --ring: oklch(0.62 0.013 142.039);
  --chart-1: oklch(0.62 0.013 142.039);
  --chart-2: oklch(0.607 0.01 280.075);
  --chart-3: oklch(0.61 0.009 9.258);
  --chart-4: oklch(0.633 0.009 280.104);
  --chart-5: oklch(0.625 0.026 141.967);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.096 0.013 140.881);
  --foreground: oklch(0.993 0.001 142.11);
  --muted: oklch(0.22 0.008 279.76);
  --muted-foreground: oklch(0.757 0 180);
  --popover: oklch(0.121 0.016 140.881);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.121 0.016 140.881);
  --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.62 0.013 142.039);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.607 0.01 280.075);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.61 0.009 9.258);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.671 0.18 34.145);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.62 0.013 142.039);
  --chart-1: oklch(0.62 0.013 142.039);
  --chart-2: oklch(0.607 0.01 280.075);
  --chart-3: oklch(0.61 0.009 9.258);
  --chart-4: oklch(0.633 0.009 280.104);
  --chart-5: oklch(0.625 0.026 141.967);
}