Material is a shadcn/ui theme built around a deep purple primary color (#20091f) with deep teal accents (#091f20). The light mode uses a neutral background (#fefbfd). Dark mode keeps the deep purple primary (#20091f) on a purple-tinted background (#0b040b).
| Token | Light | Dark |
|---|---|---|
| Background | #fefbfdsnow | #0b040bblack |
| Foreground | #0e020dblack | #f9f5f9whitesmoke |
| Card | #fcf8fcsnow | #0f050fblack |
| Card foreground | #090109black | #fbf9fbsnow |
| Popover | #fefbfdsnow | #0b040bblack |
| Popover foreground | #0e020dblack | #f9f5f9whitesmoke |
| Primary | #20091fblack | #20091fblack |
| Primary foreground | #dd7ed6orchid | #dd7ed6orchid |
| Secondary | #1f2009black | #1f2009black |
| Secondary foreground | #b8c133yellowgreen | #b8c133yellowgreen |
| Muted | #e8e8e3gainsboro | #1c1c17black |
| Muted foreground | #6b6d50dimgray | #adaf92darkgray |
| Accent | #091f20black | #091f20black |
| Accent foreground | #33b8c1lightseagreen | #33b8c1lightseagreen |
| Destructive | #c03b07firebrick | #f75a1dorangered |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #20091fblack | #20091fblack |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.80:1 | AAA |
| Text on card | 19.54:1 | AAA |
| Primary button | 7.17:1 | AAA |
| Secondary button | 8.43:1 | AAA |
| Muted text | 4.35:1 | AA Large |
| Accent | 7.15:1 | AAA |
| Destructive | 5.41:1 | AA |
| Text on background | 18.77:1 | AAA |
| Text on card | 19.09:1 | AAA |
| Primary button | 7.17:1 | AAA |
| Secondary button | 8.43:1 | AAA |
| Muted text | 7.57:1 | AAA |
| Accent | 7.15:1 | AAA |
| Destructive | 6.44:1 | AA |
Paste this into your globals.css to use Material in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.004 327.581);
--foreground: oklch(0.121 0.041 329.776);
--muted: oklch(0.93 0.007 109.628);
--muted-foreground: oklch(0.523 0.042 110.943);
--popover: oklch(0.991 0.004 327.581);
--popover-foreground: oklch(0.121 0.041 329.776);
--card: oklch(0.983 0.007 327.617);
--card-foreground: oklch(0.105 0.036 329.483);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.188 0.055 330.093);
--primary-foreground: oklch(0.726 0.16 329.521);
--secondary: oklch(0.236 0.039 112.508);
--secondary-foreground: oklch(0.78 0.158 113.359);
--accent: oklch(0.221 0.028 201.637);
--accent-foreground: oklch(0.718 0.11 202.171);
--destructive: oklch(0.543 0.177 37.35);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.188 0.055 330.093);
--chart-1: oklch(0.188 0.055 330.093);
--chart-2: oklch(0.236 0.039 112.508);
--chart-3: oklch(0.221 0.028 201.637);
--chart-4: oklch(0.284 0.05 112.744);
--chart-5: oklch(0.188 0.057 330.194);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.125 0.025 328.856);
--foreground: oklch(0.975 0.006 327.608);
--muted: oklch(0.225 0.011 110.335);
--muted-foreground: oklch(0.744 0.039 110.445);
--popover: oklch(0.125 0.025 328.856);
--popover-foreground: oklch(0.975 0.006 327.608);
--card: oklch(0.139 0.028 329.159);
--card-foreground: oklch(0.984 0.004 327.587);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.188 0.055 330.093);
--primary-foreground: oklch(0.726 0.16 329.521);
--secondary: oklch(0.236 0.039 112.508);
--secondary-foreground: oklch(0.78 0.158 113.359);
--accent: oklch(0.221 0.028 201.637);
--accent-foreground: oklch(0.718 0.11 202.171);
--destructive: oklch(0.67 0.203 38.837);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.188 0.055 330.093);
--chart-1: oklch(0.188 0.055 330.093);
--chart-2: oklch(0.236 0.039 112.508);
--chart-3: oklch(0.221 0.028 201.637);
--chart-4: oklch(0.284 0.05 112.744);
--chart-5: oklch(0.188 0.057 330.194);
}