E-reader is a shadcn/ui theme built around a neutral gray primary color (#50504e) with muted light yellow accents (#d5d1be). The light mode uses a neutral background (#fdfcf7). Dark mode keeps the neutral gray primary (#50504e) on a yellow-tinted background (#0a0905).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfcf7snow | #0a0905black |
| Foreground | #000000black | #faf9f5whitesmoke |
| Card | #fdfcf7snow | #0a0905black |
| Card foreground | #000000black | #faf9f5whitesmoke |
| Popover | #fdfcf7snow | #0a0905black |
| Popover foreground | #000000black | #faf9f5whitesmoke |
| Primary | #50504edarkslategray | #50504edarkslategray |
| Primary foreground | #e8e8e8lavender | #e8e8e8lavender |
| Secondary | #dddcd5gainsboro | #161612black |
| Secondary foreground | #474439darkslategray | #b6b3a5darkgray |
| Muted | #e9e7ddgainsboro | #222016black |
| Muted foreground | #696554dimgray | #aba896darkgray |
| Accent | #d5d1belightgrey | #343123darkslategray |
| Accent foreground | #3b3726darkslategray | #d0ccb9silver |
| Destructive | #6e0b08maroon | #f0342dcrimson |
| Destructive foreground | #f9b0aelightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #50504edarkslategray | #50504edarkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.39:1 | AAA |
| Text on card | 20.39:1 | AAA |
| Primary button | 6.62:1 | AA |
| Secondary button | 7.06:1 | AAA |
| Muted text | 4.71:1 | AA |
| Accent | 7.77:1 | AAA |
| Destructive | 6.92:1 | AA |
| Text on background | 18.88:1 | AAA |
| Text on card | 18.88:1 | AAA |
| Primary button | 6.62:1 | AA |
| Secondary button | 8.62:1 | AAA |
| Muted text | 6.82:1 | AA |
| Accent | 8.07:1 | AAA |
| Destructive | 4.00:1 | AA Large |
Paste this into your globals.css to use E-reader in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.006 97.342);
--foreground: oklch(0 0 0);
--muted: oklch(0.926 0.013 97.448);
--muted-foreground: oklch(0.506 0.027 97.886);
--popover: oklch(0.99 0.006 97.342);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.99 0.006 97.342);
--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.43 0.002 97.327);
--primary-foreground: oklch(0.932 0.001 97.267);
--secondary: oklch(0.892 0.01 97.402);
--secondary-foreground: oklch(0.387 0.019 97.858);
--accent: oklch(0.858 0.026 97.638);
--accent-foreground: oklch(0.336 0.028 98.151);
--destructive: oklch(0.344 0.131 28.797);
--destructive-foreground: oklch(0.827 0.086 21.294);
--ring: oklch(0.43 0.002 97.327);
--chart-1: oklch(0.43 0.002 97.327);
--chart-2: oklch(0.892 0.01 97.402);
--chart-3: oklch(0.858 0.026 97.638);
--chart-4: oklch(0.914 0.008 97.371);
--chart-5: oklch(0.435 0.009 97.516);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.14 0.01 99.672);
--foreground: oklch(0.982 0.006 97.341);
--muted: oklch(0.242 0.018 98.077);
--muted-foreground: oklch(0.728 0.025 97.683);
--popover: oklch(0.14 0.01 99.672);
--popover-foreground: oklch(0.982 0.006 97.341);
--card: oklch(0.14 0.01 99.672);
--card-foreground: oklch(0.982 0.006 97.341);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.43 0.002 97.327);
--primary-foreground: oklch(0.932 0.001 97.267);
--secondary: oklch(0.199 0.007 97.682);
--secondary-foreground: oklch(0.765 0.019 97.581);
--accent: oklch(0.312 0.025 98.115);
--accent-foreground: oklch(0.844 0.027 97.661);
--destructive: oklch(0.623 0.224 28.034);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.43 0.002 97.327);
--chart-1: oklch(0.43 0.002 97.327);
--chart-2: oklch(0.199 0.007 97.682);
--chart-3: oklch(0.312 0.025 98.115);
--chart-4: oklch(0.234 0.009 97.727);
--chart-5: oklch(0.435 0.009 97.516);
}