Major is a shadcn/ui theme built around a yellow primary color (#91844b) with neutral gray accents (#d7d6d1). The light mode uses a neutral background (#fefdfb). Dark mode keeps the yellow primary (#91844b) on a yellow-tinted background (#0b0a04).
| Token | Light | Dark |
|---|---|---|
| Background | #fefdfbsnow | #0b0a04black |
| Foreground | #0d0b02black | #fdfdfbsnow |
| Card | #fcfbf7snow | #0f0d06black |
| Card foreground | #090801black | #ffffffwhite |
| Popover | #fefdfbsnow | #0b0a04black |
| Popover foreground | #0d0b02black | #fdfdfbsnow |
| Primary | #91844bgray | #91844bgray |
| Primary foreground | #000000black | #000000black |
| Secondary | #ebebealinen | #343123darkslategray |
| Secondary foreground | #525251darkslategray | #d0ccb9silver |
| Muted | #dedcd4gainsboro | #2b2921darkslategray |
| Muted foreground | #6a6962dimgray | #9d9c95darkgray |
| Accent | #d7d6d1lightgrey | #4e482cdarkolivegreen |
| Accent foreground | #3f3d37darkslategray | #e2ddcbgainsboro |
| Destructive | #af3412firebrick | #ea5f39tomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #91844bgray | #91844bgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.40:1 | AAA |
| Text on card | 19.45:1 | AAA |
| Primary button | 5.59:1 | AA |
| Secondary button | 6.54:1 | AA |
| Muted text | 4.00:1 | AA Large |
| Accent | 7.43:1 | AAA |
| Destructive | 6.28:1 | AA |
| Text on background | 19.47:1 | AAA |
| Text on card | 19.44:1 | AAA |
| Primary button | 5.59:1 | AA |
| Secondary button | 8.10:1 | AAA |
| Muted text | 5.26:1 | AA |
| Accent | 6.73:1 | AA |
| Destructive | 6.19:1 | AA |
Paste this into your globals.css to use Major in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.995 0.003 96.2);
--foreground: oklch(0.15 0.025 100.382);
--muted: oklch(0.893 0.011 96.32);
--muted-foreground: oklch(0.519 0.01 96.41);
--popover: oklch(0.995 0.003 96.2);
--popover-foreground: oklch(0.15 0.025 100.382);
--card: oklch(0.989 0.005 96.235);
--card-foreground: oklch(0.131 0.021 101.38);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.611 0.079 97.03);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.939 0 96.171);
--secondary-foreground: oklch(0.439 0.002 96.228);
--accent: oklch(0.874 0.007 96.263);
--accent-foreground: oklch(0.36 0.011 96.539);
--destructive: oklch(0.508 0.165 35.198);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.611 0.079 97.03);
--chart-1: oklch(0.611 0.079 97.03);
--chart-2: oklch(0.939 0 96.171);
--chart-3: oklch(0.874 0.007 96.263);
--chart-4: oklch(0.962 0 96.169);
--chart-5: oklch(0.619 0.085 96.988);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.143 0.014 99.318);
--foreground: oklch(0.994 0.002 96.193);
--muted: oklch(0.282 0.015 96.735);
--muted-foreground: oklch(0.691 0.01 96.339);
--popover: oklch(0.143 0.014 99.318);
--popover-foreground: oklch(0.994 0.002 96.193);
--card: oklch(0.158 0.016 98.013);
--card-foreground: oklch(1 0 180);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.611 0.079 97.03);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.311 0.024 96.936);
--secondary-foreground: oklch(0.843 0.026 96.535);
--accent: oklch(0.4 0.044 97.054);
--accent-foreground: oklch(0.897 0.025 96.501);
--destructive: oklch(0.658 0.181 36.167);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.611 0.079 97.03);
--chart-1: oklch(0.611 0.079 97.03);
--chart-2: oklch(0.311 0.024 96.936);
--chart-3: oklch(0.4 0.044 97.054);
--chart-4: oklch(0.345 0.028 96.951);
--chart-5: oklch(0.619 0.085 96.988);
}