Literate for shadcn/ui

Literate is a shadcn/ui theme built around a near-white primary color (#fefbfb) with near-white accents (#fefdfb). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-white primary (#fefbfb) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#040101black
#fbf9f9snow
Card
#fcfcfcsnow
#030303black
Card foreground
#000000black
#fdfcfcsnow
Popover
#fcfcfcsnow
#030303black
Popover foreground
#000000black
#fdfcfcsnow
Primary
#fefbfbsnow
#fefbfbsnow
Primary foreground
#a52422brown
#a52422brown
Secondary
#fefbfcsnow
#fefbfcsnow
Secondary foreground
#a52261mediumvioletred
#a52261mediumvioletred
Muted
#eee2e8mistyrose
#1d1117black
Muted foreground
#5e5559dimgray
#aaa1a6darkgray
Accent
#fefdfbsnow
#fefdfbsnow
Accent foreground
#503210saddlebrown
#503210saddlebrown
Destructive
#ae390ffirebrick
#eb5119orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fefbfbsnow
#fefbfbsnow

Contrast

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

Light mode
Text on background20.79:1AAA
Text on card20.54:1AAA
Primary button7.09:1AAA
Secondary button6.79:1AA
Muted text5.72:1AA
Accent11.41:1AAA
Destructive6.19:1AA
Dark mode
Text on background20.02:1AAA
Text on card20.19:1AAA
Primary button7.09:1AAA
Secondary button6.79:1AA
Muted text7.29:1AAA
Accent11.41:1AAA
Destructive3.66:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.083 0.013 21.752);
  --muted: oklch(0.924 0.014 346.429);
  --muted-foreground: oklch(0.459 0.013 346.779);
  --popover: oklch(0.992 0 161.565);
  --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.99 0.004 18.416);
  --primary-foreground: oklch(0.474 0.166 26.986);
  --secondary: oklch(0.99 0.004 346.129);
  --secondary-foreground: oklch(0.487 0.174 356.833);
  --accent: oklch(0.993 0.003 69.622);
  --accent-foreground: oklch(0.346 0.064 64.24);
  --destructive: oklch(0.51 0.159 37.65);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.99 0.004 18.416);
  --chart-1: oklch(0.99 0.004 18.416);
  --chart-2: oklch(0.99 0.004 346.129);
  --chart-3: oklch(0.993 0.003 69.622);
  --chart-4: oklch(1.019 0.008 165.801);
  --chart-5: oklch(0.99 0.004 18.419);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.983 0.003 18.407);
  --muted: oklch(0.196 0.022 348.756);
  --muted-foreground: oklch(0.719 0.012 346.455);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(0.991 0.001 18.384);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.991 0.001 18.384);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.99 0.004 18.416);
  --primary-foreground: oklch(0.474 0.166 26.986);
  --secondary: oklch(0.99 0.004 346.129);
  --secondary-foreground: oklch(0.487 0.174 356.833);
  --accent: oklch(0.993 0.003 69.622);
  --accent-foreground: oklch(0.346 0.064 64.24);
  --destructive: oklch(0.64 0.199 37.688);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.99 0.004 18.416);
  --chart-1: oklch(0.99 0.004 18.416);
  --chart-2: oklch(0.99 0.004 346.129);
  --chart-3: oklch(0.993 0.003 69.622);
  --chart-4: oklch(1.019 0.008 165.801);
  --chart-5: oklch(0.99 0.004 18.419);
}