Scholar is a shadcn/ui theme built around a neutral gray primary color (#3d3c38) with neutral gray accents (#3c3d38). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#3d3c38) on a yellow-tinted background (#0a0905).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #0a0905black |
| Foreground | #090702black | #f8f8f6whitesmoke |
| Card | #fcfcfcsnow | #0d0c07black |
| Card foreground | #040301black | #fbfaf9snow |
| Popover | #fcfcfcsnow | #0d0c07black |
| Popover foreground | #040301black | #fbfaf9snow |
| Primary | #3d3c38darkslategray | #3d3c38darkslategray |
| Primary foreground | #d5d4d2lightgrey | #d5d4d2lightgrey |
| Secondary | #3d3938darkslategray | #3d3938darkslategray |
| Secondary foreground | #d5d3d2lightgrey | #d5d3d2lightgrey |
| Muted | #e2dcdagainsboro | #251f1dblack |
| Muted foreground | #625c5bdimgray | #a49f9ddarkgray |
| Accent | #3c3d38darkslategray | #3c3d38darkslategray |
| Accent foreground | #d5d5d2lightgrey | #d5d5d2lightgrey |
| Destructive | #822a0dsaddlebrown | #ed6f45tomato |
| Destructive foreground | #f9d4c7peachpuff | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #3d3c38darkslategray | #3d3c38darkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.13:1 | AAA |
| Text on card | 20.17:1 | AAA |
| Primary button | 7.47:1 | AAA |
| Secondary button | 7.61:1 | AAA |
| Muted text | 4.82:1 | AA |
| Accent | 7.44:1 | AAA |
| Destructive | 6.67:1 | AA |
| Text on background | 18.74:1 | AAA |
| Text on card | 18.78:1 | AAA |
| Primary button | 7.47:1 | AAA |
| Secondary button | 7.61:1 | AAA |
| Muted text | 6.20:1 | AA |
| Accent | 7.44:1 | AAA |
| Destructive | 6.95:1 | AA |
Paste this into your globals.css to use Scholar in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.127 0.018 96.157);
--muted: oklch(0.898 0.007 37.704);
--muted-foreground: oklch(0.481 0.008 37.669);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.101 0.014 96.157);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.101 0.014 96.157);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.355 0.006 90.244);
--primary-foreground: oklch(0.871 0.004 90.152);
--secondary: oklch(0.349 0.005 37.674);
--secondary-foreground: oklch(0.868 0.003 37.724);
--accent: oklch(0.357 0.008 117.485);
--accent-foreground: oklch(0.873 0.005 117.178);
--destructive: oklch(0.415 0.127 37.243);
--destructive-foreground: oklch(0.898 0.046 39.283);
--ring: oklch(0.355 0.006 90.244);
--chart-1: oklch(0.355 0.006 90.244);
--chart-2: oklch(0.349 0.005 37.674);
--chart-3: oklch(0.357 0.008 117.485);
--chart-4: oklch(0.378 0.006 37.672);
--chart-5: oklch(0.358 0.011 90.317);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.139 0.01 93.235);
--foreground: oklch(0.978 0.002 90.135);
--muted: oklch(0.246 0.01 37.609);
--muted-foreground: oklch(0.706 0.007 37.694);
--popover: oklch(0.153 0.011 91.499);
--popover-foreground: oklch(0.986 0.001 90.13);
--card: oklch(0.153 0.011 91.499);
--card-foreground: oklch(0.986 0.001 90.13);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.355 0.006 90.244);
--primary-foreground: oklch(0.871 0.004 90.152);
--secondary: oklch(0.349 0.005 37.674);
--secondary-foreground: oklch(0.868 0.003 37.724);
--accent: oklch(0.357 0.008 117.485);
--accent-foreground: oklch(0.873 0.005 117.178);
--destructive: oklch(0.685 0.165 38.716);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.355 0.006 90.244);
--chart-1: oklch(0.355 0.006 90.244);
--chart-2: oklch(0.349 0.005 37.674);
--chart-3: oklch(0.357 0.008 117.485);
--chart-4: oklch(0.378 0.006 37.672);
--chart-5: oklch(0.358 0.011 90.317);
}