Population for shadcn/ui

Population is a shadcn/ui theme built around a near-black primary color (#03050c) with near-black accents (#06030c). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#03050c) on a blue-tinted background (#05060a).

Color palette

TokenLightDark
Background
#ffffffwhite
#05060ablack
Foreground
#000000black
#f5f6fawhitesmoke
Card
#fcfcfcsnow
#07080eblack
Card foreground
#000000black
#f8f9fbghostwhite
Popover
#ffffffwhite
#05060ablack
Popover foreground
#000000black
#f5f6fawhitesmoke
Primary
#03050cblack
#03050cblack
Primary foreground
#bac3eelightsteelblue
#bac3eelightsteelblue
Secondary
#03090cblack
#03090cblack
Secondary foreground
#68b5d9cornflowerblue
#68b5d9cornflowerblue
Muted
#cadee8gainsboro
#172c35darkslategray
Muted foreground
#484e51darkslategray
#aeb4b7darkgray
Accent
#06030cblack
#06030cblack
Accent foreground
#cabaeethistle
#cabaeethistle
Destructive
#602206maroon
#f36e30tomato
Destructive foreground
#f9bb9flightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#03050cblack
#03050cblack

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button11.77:1AAA
Secondary button8.76:1AAA
Muted text6.09:1AA
Accent11.46:1AAA
Destructive7.27:1AAA
Dark mode
Text on background18.75:1AAA
Text on card18.99:1AAA
Primary button11.77:1AAA
Secondary button8.76:1AAA
Muted text6.92:1AA
Accent11.46:1AAA
Destructive7.06:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.889 0.025 227.239);
  --muted-foreground: oklch(0.42 0.009 227.15);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --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.115 0.021 268.781);
  --primary-foreground: oklch(0.825 0.061 275.083);
  --secondary: oklch(0.134 0.015 221.64);
  --secondary-foreground: oklch(0.738 0.092 229.734);
  --accent: oklch(0.112 0.027 300.933);
  --accent-foreground: oklch(0.819 0.074 299.257);
  --destructive: oklch(0.343 0.098 41.644);
  --destructive-foreground: oklch(0.843 0.082 45.963);
  --ring: oklch(0.115 0.021 268.781);
  --chart-1: oklch(0.115 0.021 268.781);
  --chart-2: oklch(0.134 0.015 221.64);
  --chart-3: oklch(0.112 0.027 300.933);
  --chart-4: oklch(0.176 0.022 228.653);
  --chart-5: oklch(0.114 0.022 268.251);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.011 272.55);
  --foreground: oklch(0.973 0.005 276.098);
  --muted: oklch(0.279 0.032 229.253);
  --muted-foreground: oklch(0.766 0.008 226.989);
  --popover: oklch(0.123 0.011 272.55);
  --popover-foreground: oklch(0.973 0.005 276.098);
  --card: oklch(0.136 0.013 273.109);
  --card-foreground: oklch(0.982 0.003 276.121);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.115 0.021 268.781);
  --primary-foreground: oklch(0.825 0.061 275.083);
  --secondary: oklch(0.134 0.015 221.64);
  --secondary-foreground: oklch(0.738 0.092 229.734);
  --accent: oklch(0.112 0.027 300.933);
  --accent-foreground: oklch(0.819 0.074 299.257);
  --destructive: oklch(0.69 0.18 42.729);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.115 0.021 268.781);
  --chart-1: oklch(0.115 0.021 268.781);
  --chart-2: oklch(0.134 0.015 221.64);
  --chart-3: oklch(0.112 0.027 300.933);
  --chart-4: oklch(0.176 0.022 228.653);
  --chart-5: oklch(0.114 0.022 268.251);
}