Literate for shadcn/ui

Literate is a shadcn/ui theme built around a near-black primary color (#121212) with neutral gray accents (#e0e2df). The light mode uses a neutral background (#f9fcf8). Dark mode keeps the near-black primary (#121212) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f9fcf8mintcream
#000000black
Foreground
#060c03black
#f9fcf8mintcream
Card
#f9fcf8mintcream
#000000black
Card foreground
#060c03black
#f9fcf8mintcream
Popover
#f9fcf8mintcream
#000000black
Popover foreground
#060c03black
#f9fcf8mintcream
Primary
#121212black
#121212black
Primary foreground
#abacaadarkgray
#abacaadarkgray
Secondary
#e0e2dfgainsboro
#191c17black
Secondary foreground
#464c43darkslategray
#b1b9acdarkgray
Muted
#f1f7eewhitesmoke
#0b1108black
Muted foreground
#646b61dimgray
#979e94darkgray
Accent
#e0e2dfgainsboro
#191c17black
Accent foreground
#464c43darkslategray
#b1b9acdarkgray
Destructive
#8c2d0dsaddlebrown
#ed6b40tomato
Destructive foreground
#fbdbd0bisque
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#121212black
#121212black

Contrast

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

Light mode
Text on background19.14:1AAA
Text on card19.14:1AAA
Primary button8.22:1AAA
Secondary button6.79:1AA
Muted text5.04:1AA
Accent6.79:1AA
Destructive6.47:1AA
Dark mode
Text on background20.30:1AAA
Text on card20.30:1AAA
Primary button8.22:1AAA
Secondary button8.55:1AAA
Muted text6.93:1AA
Accent8.55:1AAA
Destructive6.78:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.006 134.257);
  --foreground: oklch(0.144 0.023 132.823);
  --muted: oklch(0.969 0.014 134.299);
  --muted-foreground: oklch(0.519 0.018 134.414);
  --popover: oklch(0.988 0.006 134.257);
  --popover-foreground: oklch(0.144 0.023 132.823);
  --card: oklch(0.988 0.006 134.257);
  --card-foreground: oklch(0.144 0.023 132.823);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.182 0.001 134.245);
  --primary-foreground: oklch(0.742 0.003 134.24);
  --secondary: oklch(0.911 0.006 134.254);
  --secondary-foreground: oklch(0.407 0.016 134.441);
  --accent: oklch(0.911 0.006 134.254);
  --accent-foreground: oklch(0.407 0.016 134.441);
  --destructive: oklch(0.436 0.135 37.061);
  --destructive-foreground: oklch(0.915 0.038 39.308);
  --ring: oklch(0.182 0.001 134.245);
  --chart-1: oklch(0.182 0.001 134.245);
  --chart-2: oklch(0.911 0.006 134.254);
  --chart-3: oklch(0.911 0.006 134.254);
  --chart-4: oklch(0.933 0.004 134.245);
  --chart-5: oklch(0.183 0.003 134.319);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.987 0.005 134.247);
  --muted: oklch(0.169 0.021 134.76);
  --muted-foreground: oklch(0.691 0.016 134.355);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.987 0.005 134.247);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.987 0.005 134.247);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.182 0.001 134.245);
  --primary-foreground: oklch(0.742 0.003 134.24);
  --secondary: oklch(0.22 0.009 134.448);
  --secondary-foreground: oklch(0.775 0.019 134.36);
  --accent: oklch(0.22 0.009 134.448);
  --accent-foreground: oklch(0.775 0.019 134.36);
  --destructive: oklch(0.679 0.171 38.574);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.182 0.001 134.245);
  --chart-1: oklch(0.182 0.001 134.245);
  --chart-2: oklch(0.22 0.009 134.448);
  --chart-3: oklch(0.22 0.009 134.448);
  --chart-4: oklch(0.254 0.011 134.468);
  --chart-5: oklch(0.183 0.003 134.319);
}