Scholar is a shadcn/ui theme built around a deep green primary color (#2e471a) with deep violet accents (#331a47). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep green primary (#2e471a) on a green-tinted background (#070c03).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #070c03black |
| Foreground | #020401black | #fafbf8snow |
| Card | #ffffffwhite | #070c03black |
| Card foreground | #020401black | #fafbf8snow |
| Popover | #ffffffwhite | #070c03black |
| Popover foreground | #020401black | #fafbf8snow |
| Primary | #2e471adarkslategray | #2e471adarkslategray |
| Primary foreground | #c7e2b1silver | #c7e2b1silver |
| Secondary | #331a47midnightblue | #331a47midnightblue |
| Secondary foreground | #ccb1e2thistle | #ccb1e2thistle |
| Muted | #e3e1e5gainsboro | #1c1a1eblack |
| Muted foreground | #403f40darkslategray | #bfbfc0silver |
| Accent | #331a47midnightblue | #331a47midnightblue |
| Accent foreground | #ccb1e2thistle | #ccb1e2thistle |
| Destructive | #73160cmaroon | #e9422ftomato |
| Destructive foreground | #f8c0balightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #2e471adarkslategray | #2e471adarkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.58:1 | AAA |
| Text on card | 20.58:1 | AAA |
| Primary button | 7.37:1 | AAA |
| Secondary button | 7.94:1 | AAA |
| Muted text | 8.05:1 | AAA |
| Accent | 7.94:1 | AAA |
| Destructive | 7.12:1 | AAA |
| Text on background | 19.02:1 | AAA |
| Text on card | 19.02:1 | AAA |
| Primary button | 7.37:1 | AAA |
| Secondary button | 7.94:1 | AAA |
| Muted text | 9.40:1 | AAA |
| Accent | 7.94:1 | AAA |
| Destructive | 3.96:1 | AA Large |
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.1 0.016 129.093);
--muted: oklch(0.912 0.007 310.37);
--muted-foreground: oklch(0.369 0.002 310.379);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.1 0.016 129.093);
--card: oklch(1 0 180);
--card-foreground: oklch(0.1 0.016 129.093);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.365 0.076 132.996);
--primary-foreground: oklch(0.88 0.072 131.244);
--secondary: oklch(0.276 0.083 307.212);
--secondary-foreground: oklch(0.799 0.074 309.573);
--accent: oklch(0.276 0.083 307.212);
--accent-foreground: oklch(0.799 0.074 309.573);
--destructive: oklch(0.365 0.129 30.423);
--destructive-foreground: oklch(0.856 0.065 25.791);
--ring: oklch(0.365 0.076 132.996);
--chart-1: oklch(0.365 0.076 132.996);
--chart-2: oklch(0.276 0.083 307.212);
--chart-3: oklch(0.276 0.083 307.212);
--chart-4: oklch(0.302 0.093 307.076);
--chart-5: oklch(0.369 0.08 133.174);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.145 0.023 129.333);
--foreground: oklch(0.987 0.004 130.477);
--muted: oklch(0.222 0.009 310.046);
--muted-foreground: oklch(0.804 0.002 310.415);
--popover: oklch(0.145 0.023 129.333);
--popover-foreground: oklch(0.987 0.004 130.477);
--card: oklch(0.145 0.023 129.333);
--card-foreground: oklch(0.987 0.004 130.477);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.365 0.076 132.996);
--primary-foreground: oklch(0.88 0.072 131.244);
--secondary: oklch(0.276 0.083 307.212);
--secondary-foreground: oklch(0.799 0.074 309.573);
--accent: oklch(0.276 0.083 307.212);
--accent-foreground: oklch(0.799 0.074 309.573);
--destructive: oklch(0.623 0.207 30.174);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.365 0.076 132.996);
--chart-1: oklch(0.365 0.076 132.996);
--chart-2: oklch(0.276 0.083 307.212);
--chart-3: oklch(0.276 0.083 307.212);
--chart-4: oklch(0.302 0.093 307.076);
--chart-5: oklch(0.369 0.08 133.174);
}