Commerce is a shadcn/ui theme built around a blue primary color (#4775a9) with indigo accents (#4a47a9). The light mode uses a neutral background (#ffffff). Dark mode keeps the blue primary (#4775a9) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #010204black | #f9fafbghostwhite |
| Card | #fcfcfcsnow | #030303black |
| Card foreground | #000000black | #fcfcfdwhite |
| Popover | #fcfcfcsnow | #030303black |
| Popover foreground | #000000black | #fcfcfdwhite |
| Primary | #4775a9steelblue | #4775a9steelblue |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #47a6a9cadetblue | #47a6a9cadetblue |
| Secondary foreground | #0b1919black | #0b1919black |
| Muted | #e8f2f2whitesmoke | #0d1617black |
| Muted foreground | #545959dimgray | #a6ababdarkgray |
| Accent | #4a47a9darkslateblue | #4a47a9darkslateblue |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #a23a07saddlebrown | #f66923chocolate |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #4775a9steelblue | #4775a9steelblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.75:1 | AAA |
| Text on card | 20.54:1 | AAA |
| Primary button | 4.81:1 | AA |
| Secondary button | 6.22:1 | AA |
| Muted text | 6.23:1 | AA |
| Accent | 7.61:1 | AAA |
| Destructive | 6.68:1 | AA |
| Text on background | 20.09:1 | AAA |
| Text on card | 20.16:1 | AAA |
| Primary button | 4.81:1 | AA |
| Secondary button | 6.22:1 | AA |
| Muted text | 7.87:1 | AAA |
| Accent | 7.61:1 | AAA |
| Destructive | 6.95:1 | AA |
Paste this into your globals.css to use Commerce in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.088 0.009 243.814);
--muted: oklch(0.953 0.01 199.465);
--muted-foreground: oklch(0.46 0.006 199.418);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.992 0 161.565);
--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.551 0.097 252.833);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.669 0.089 198.369);
--secondary-foreground: oklch(0.199 0.02 198.524);
--accent: oklch(0.457 0.153 279.935);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.49 0.147 40.968);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.551 0.097 252.833);
--chart-1: oklch(0.551 0.097 252.833);
--chart-2: oklch(0.669 0.089 198.369);
--chart-3: oklch(0.457 0.153 279.935);
--chart-4: oklch(0.7 0.093 198.369);
--chart-5: oklch(0.551 0.103 252.983);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.984 0.002 251.47);
--muted: oklch(0.193 0.014 198.757);
--muted-foreground: oklch(0.736 0.006 199.5);
--popover: oklch(0.092 0 180);
--popover-foreground: oklch(0.992 0.001 251.46);
--card: oklch(0.092 0 180);
--card-foreground: oklch(0.992 0.001 251.46);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.551 0.097 252.833);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.669 0.089 198.369);
--secondary-foreground: oklch(0.199 0.02 198.524);
--accent: oklch(0.457 0.153 279.935);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.687 0.189 42.876);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.551 0.097 252.833);
--chart-1: oklch(0.551 0.097 252.833);
--chart-2: oklch(0.669 0.089 198.369);
--chart-3: oklch(0.457 0.153 279.935);
--chart-4: oklch(0.7 0.093 198.369);
--chart-5: oklch(0.551 0.103 252.983);
}