Major is a shadcn/ui theme built around a neutral gray primary color (#b5b0b3) with neutral gray accents (#b5b0b1). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#b5b0b3) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #000000black | #fdfcfdwhite |
| Card | #ffffffwhite | #000000black |
| Card foreground | #000000black | #fdfcfdwhite |
| Popover | #ffffffwhite | #000000black |
| Popover foreground | #000000black | #fdfcfdwhite |
| Primary | #b5b0b3darkgray | #b5b0b3darkgray |
| Primary foreground | #1a191ablack | #1a191ablack |
| Secondary | #b4b0b5darkgray | #b4b0b5darkgray |
| Secondary foreground | #1a191ablack | #1a191ablack |
| Muted | #efebf0whitesmoke | #140f14black |
| Muted foreground | #655167dimgray | #ad98aedarkgray |
| Accent | #b5b0b1darkgray | #b5b0b1darkgray |
| Accent foreground | #1a1919black | #1a1919black |
| Destructive | #d1420achocolate | #f5662etomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #b5b0b3darkgray | #b5b0b3darkgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 8.21:1 | AAA |
| Secondary button | 8.21:1 | AAA |
| Muted text | 6.07:1 | AA |
| Accent | 8.20:1 | AAA |
| Destructive | 4.64:1 | AA |
| Text on background | 20.51:1 | AAA |
| Text on card | 20.51:1 | AAA |
| Primary button | 8.21:1 | AAA |
| Secondary button | 8.21:1 | AAA |
| Muted text | 7.09:1 | AAA |
| Accent | 8.20:1 | AAA |
| Destructive | 6.83:1 | AA |
Paste this into your globals.css to use Major in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0 0 0);
--muted: oklch(0.944 0.008 323.681);
--muted-foreground: oklch(0.463 0.043 324.104);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0 0 0);
--card: oklch(1 0 180);
--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.762 0.006 342.006);
--primary-foreground: oklch(0.214 0.003 342.13);
--secondary: oklch(0.763 0.008 323.69);
--secondary-foreground: oklch(0.215 0.004 323.724);
--accent: oklch(0.762 0.005 12.571);
--accent-foreground: oklch(0.214 0.002 12.662);
--destructive: oklch(0.581 0.188 37.46);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.762 0.006 342.006);
--chart-1: oklch(0.762 0.006 342.006);
--chart-2: oklch(0.763 0.008 323.69);
--chart-3: oklch(0.762 0.005 12.571);
--chart-4: oklch(0.787 0.007 323.683);
--chart-5: oklch(0.76 0.013 342.204);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.992 0.001 341.843);
--muted: oklch(0.178 0.013 323.992);
--muted-foreground: oklch(0.705 0.039 323.919);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.992 0.001 341.843);
--card: oklch(0 0 0);
--card-foreground: oklch(0.992 0.001 341.843);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.762 0.006 342.006);
--primary-foreground: oklch(0.214 0.003 342.13);
--secondary: oklch(0.763 0.008 323.69);
--secondary-foreground: oklch(0.215 0.004 323.724);
--accent: oklch(0.762 0.005 12.571);
--accent-foreground: oklch(0.214 0.002 12.662);
--destructive: oklch(0.683 0.188 40.077);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.762 0.006 342.006);
--chart-1: oklch(0.762 0.006 342.006);
--chart-2: oklch(0.763 0.008 323.69);
--chart-3: oklch(0.762 0.005 12.571);
--chart-4: oklch(0.787 0.007 323.683);
--chart-5: oklch(0.76 0.013 342.204);
}