Modern is a shadcn/ui theme built around a muted yellow primary color (#807e5b) with muted green accents (#70805b). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted yellow primary (#807e5b) on a neutral background (#080802).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #080802black |
| Foreground | #040401black | #fbfaf9snow |
| Card | #ffffffwhite | #080802black |
| Card foreground | #040401black | #fbfaf9snow |
| Popover | #ffffffwhite | #080802black |
| Popover foreground | #040401black | #fbfaf9snow |
| Primary | #807e5bdimgray | #807e5bdimgray |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #806c5bdimgray | #806c5bdimgray |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #e9e2ddgainsboro | #221b16black |
| Muted foreground | #564e48darkolivegreen | #b7afa9darkgray |
| Accent | #70805bdimgray | #70805bdimgray |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #af2f08firebrick | #db3b0aorangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #807e5bdimgray | #807e5bdimgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.52:1 | AAA |
| Text on card | 20.52:1 | AAA |
| Primary button | 4.13:1 | AA Large |
| Secondary button | 4.98:1 | AA |
| Muted text | 6.36:1 | AA |
| Accent | 4.25:1 | AA Large |
| Destructive | 6.47:1 | AA |
| Text on background | 19.29:1 | AAA |
| Text on card | 19.29:1 | AAA |
| Primary button | 4.13:1 | AA Large |
| Secondary button | 4.98:1 | AA |
| Muted text | 7.83:1 | AAA |
| Accent | 4.25:1 | AA Large |
| Destructive | 4.51:1 | AA |
Paste this into your globals.css to use Modern in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.105 0.016 106.964);
--muted: oklch(0.918 0.011 62.041);
--muted-foreground: oklch(0.431 0.015 61.73);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.105 0.016 106.964);
--card: oklch(1 0 180);
--card-foreground: oklch(0.105 0.016 106.964);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.587 0.051 105.331);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.545 0.036 61.232);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.577 0.058 127.803);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.502 0.17 35.139);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.587 0.051 105.331);
--chart-1: oklch(0.587 0.051 105.331);
--chart-2: oklch(0.545 0.036 61.232);
--chart-3: oklch(0.577 0.058 127.803);
--chart-4: oklch(0.572 0.038 61.224);
--chart-5: oklch(0.596 0.059 105.499);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.13 0.017 106.567);
--foreground: oklch(0.986 0.002 103.998);
--muted: oklch(0.23 0.015 61.261);
--muted-foreground: oklch(0.759 0.013 61.97);
--popover: oklch(0.13 0.017 106.567);
--popover-foreground: oklch(0.986 0.002 103.998);
--card: oklch(0.13 0.017 106.567);
--card-foreground: oklch(0.986 0.002 103.998);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.587 0.051 105.331);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.545 0.036 61.232);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.577 0.058 127.803);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.59 0.203 34.856);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.587 0.051 105.331);
--chart-1: oklch(0.587 0.051 105.331);
--chart-2: oklch(0.545 0.036 61.232);
--chart-3: oklch(0.577 0.058 127.803);
--chart-4: oklch(0.572 0.038 61.224);
--chart-5: oklch(0.596 0.059 105.499);
}