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).
| Token | Light | Dark |
|---|---|---|
| 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 |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.14:1 | AAA |
| Text on card | 19.14:1 | AAA |
| Primary button | 8.22:1 | AAA |
| Secondary button | 6.79:1 | AA |
| Muted text | 5.04:1 | AA |
| Accent | 6.79:1 | AA |
| Destructive | 6.47:1 | AA |
| Text on background | 20.30:1 | AAA |
| Text on card | 20.30:1 | AAA |
| Primary button | 8.22:1 | AAA |
| Secondary button | 8.55:1 | AAA |
| Muted text | 6.93:1 | AA |
| Accent | 8.55:1 | AAA |
| Destructive | 6.78:1 | AA |
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);
}