Scholarly is a shadcn/ui theme built around a muted deep pink primary color (#171214) with muted deep teal accents (#121715). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep pink primary (#171214) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #000000black | #f9f6f7whitesmoke |
| Card | #fcfcfcsnow | #030303black |
| Card foreground | #000000black | #fbf9fasnow |
| Popover | #fcfcfcsnow | #030303black |
| Popover foreground | #000000black | #fbf9fasnow |
| Primary | #171214black | #171214black |
| Primary foreground | #b9a2aadarkgray | #b9a2aadarkgray |
| Secondary | #121715black | #121715black |
| Secondary foreground | #a2b9b1darkgray | #a2b9b1darkgray |
| Muted | #d4dedagainsboro | #212b28darkslategray |
| Muted foreground | #454a48darkslategray | #b5bab8silver |
| Accent | #121715black | #121715black |
| Accent foreground | #a2b9b1darkgray | #a2b9b1darkgray |
| Destructive | #9b0603darkred | #fa1d19red |
| Destructive foreground | #fed3d2pink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #171214black | #171214black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 21.00:1 | AAA |
| Text on card | 20.54:1 | AAA |
| Primary button | 7.79:1 | AAA |
| Secondary button | 8.71:1 | AAA |
| Muted text | 6.54:1 | AA |
| Accent | 8.71:1 | AAA |
| Destructive | 6.39:1 | AA |
| Text on background | 19.55:1 | AAA |
| Text on card | 19.72:1 | AAA |
| Primary button | 7.79:1 | AAA |
| Secondary button | 8.71:1 | AAA |
| Muted text | 7.39:1 | AAA |
| Accent | 8.71:1 | AAA |
| Destructive | 3.98:1 | AA Large |
Paste this into your globals.css to use Scholarly in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0 0 0);
--muted: oklch(0.891 0.012 173.188);
--muted-foreground: oklch(0.403 0.006 173.125);
--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.188 0.01 355.079);
--primary-foreground: oklch(0.734 0.029 354.676);
--secondary: oklch(0.199 0.01 172.097);
--secondary-foreground: oklch(0.765 0.028 172.487);
--accent: oklch(0.199 0.01 172.097);
--accent-foreground: oklch(0.765 0.028 172.487);
--destructive: oklch(0.435 0.175 29.233);
--destructive-foreground: oklch(0.903 0.049 19.24);
--ring: oklch(0.188 0.01 355.079);
--chart-1: oklch(0.188 0.01 355.079);
--chart-2: oklch(0.199 0.01 172.097);
--chart-3: oklch(0.199 0.01 172.097);
--chart-4: oklch(0.235 0.013 171.914);
--chart-5: oklch(0.187 0.012 355.407);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.975 0.004 353.689);
--muted: oklch(0.279 0.015 171.882);
--muted-foreground: oklch(0.784 0.005 173.38);
--popover: oklch(0.092 0 180);
--popover-foreground: oklch(0.983 0.003 353.65);
--card: oklch(0.092 0 180);
--card-foreground: oklch(0.983 0.003 353.65);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.188 0.01 355.079);
--primary-foreground: oklch(0.734 0.029 354.676);
--secondary: oklch(0.199 0.01 172.097);
--secondary-foreground: oklch(0.765 0.028 172.487);
--accent: oklch(0.199 0.01 172.097);
--accent-foreground: oklch(0.765 0.028 172.487);
--destructive: oklch(0.627 0.246 28.699);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.188 0.01 355.079);
--chart-1: oklch(0.188 0.01 355.079);
--chart-2: oklch(0.199 0.01 172.097);
--chart-3: oklch(0.199 0.01 172.097);
--chart-4: oklch(0.235 0.013 171.914);
--chart-5: oklch(0.187 0.012 355.407);
}