Encyclopedia for shadcn/ui

Encyclopedia is a shadcn/ui theme built around a near-black primary color (#070c03) with near-black accents (#0c0307). The light mode uses a neutral background (#fcfefb). Dark mode keeps the near-black primary (#070c03) on a neutral background (#050802).

Color palette

TokenLightDark
Background
#fcfefbwhite
#050802black
Foreground
#0a1104black
#fafcf8snow
Card
#fafcf8snow
#070c03black
Card foreground
#070d03black
#fcfdfcwhite
Popover
#fcfefbwhite
#050802black
Popover foreground
#0a1104black
#fafcf8snow
Primary
#070c03black
#070c03black
Primary foreground
#6bb329olivedrab
#6bb329olivedrab
Secondary
#03070cblack
#03070cblack
Secondary foreground
#659fdccornflowerblue
#659fdccornflowerblue
Muted
#e8edf2lavender
#0d1217black
Muted foreground
#525960dimgray
#9fa6addarkgray
Accent
#0c0307black
#0c0307black
Accent foreground
#dc659fpalevioletred
#dc659fpalevioletred
Destructive
#8a2b0fsaddlebrown
#e74818orangered
Destructive foreground
#fadad1bisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#070c03black
#070c03black

Contrast

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

Light mode
Text on background18.88:1AAA
Text on card19.05:1AAA
Primary button7.60:1AAA
Secondary button7.24:1AAA
Muted text6.03:1AA
Accent6.20:1AA
Destructive6.54:1AA
Dark mode
Text on background19.51:1AAA
Text on card19.34:1AAA
Primary button7.60:1AAA
Secondary button7.24:1AAA
Muted text7.66:1AAA
Accent6.20:1AA
Destructive3.93:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 129.16);
  --foreground: oklch(0.165 0.031 129.35);
  --muted: oklch(0.944 0.009 249.736);
  --muted-foreground: oklch(0.461 0.015 249.938);
  --popover: oklch(0.994 0.003 129.16);
  --popover-foreground: oklch(0.165 0.031 129.35);
  --card: oklch(0.989 0.006 129.194);
  --card-foreground: oklch(0.147 0.026 128.091);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.147 0.026 128.1);
  --primary-foreground: oklch(0.693 0.18 133.596);
  --secondary: oklch(0.127 0.016 241.416);
  --secondary-foreground: oklch(0.687 0.109 251.186);
  --accent: oklch(0.12 0.027 346.179);
  --accent-foreground: oklch(0.668 0.161 352.108);
  --destructive: oklch(0.432 0.135 36.298);
  --destructive-foreground: oklch(0.914 0.038 37.608);
  --ring: oklch(0.147 0.026 128.1);
  --chart-1: oklch(0.147 0.026 128.1);
  --chart-2: oklch(0.127 0.016 241.416);
  --chart-3: oklch(0.12 0.027 346.179);
  --chart-4: oklch(0.164 0.026 249.463);
  --chart-5: oklch(0.147 0.027 128.086);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.127 0.021 127.876);
  --foreground: oklch(0.988 0.005 129.183);
  --muted: oklch(0.178 0.013 250.287);
  --muted-foreground: oklch(0.72 0.013 249.819);
  --popover: oklch(0.127 0.021 127.876);
  --popover-foreground: oklch(0.988 0.005 129.183);
  --card: oklch(0.146 0.024 128.121);
  --card-foreground: oklch(0.994 0.003 129.154);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.147 0.026 128.1);
  --primary-foreground: oklch(0.693 0.18 133.596);
  --secondary: oklch(0.127 0.016 241.416);
  --secondary-foreground: oklch(0.687 0.109 251.186);
  --accent: oklch(0.12 0.027 346.179);
  --accent-foreground: oklch(0.668 0.161 352.108);
  --destructive: oklch(0.624 0.202 35.83);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.147 0.026 128.1);
  --chart-1: oklch(0.147 0.026 128.1);
  --chart-2: oklch(0.127 0.016 241.416);
  --chart-3: oklch(0.12 0.027 346.179);
  --chart-4: oklch(0.164 0.026 249.463);
  --chart-5: oklch(0.147 0.027 128.086);
}