Collateral is a shadcn/ui theme built around a vivid red primary color (#f20d37) with vivid blue accents (#0d37f2). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid red primary (#f20d37) on a red-tinted background (#0d0708).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #0d0708black |
| Foreground | #0f0507black | #fbf8f9snow |
| Card | #fcfcfcsnow | #11090ablack |
| Card foreground | #0b0405black | #fdfcfcsnow |
| Popover | #ffffffwhite | #0d0708black |
| Popover foreground | #0f0507black | #fbf8f9snow |
| Primary | #f20d37crimson | #f20d37crimson |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #37f20dlimegreen | #37f20dlimegreen |
| Secondary foreground | #0b3003black | #0b3003black |
| Muted | #d3e1d0lightgrey | #212f1edarkslategray |
| Muted foreground | #5d615cdimgray | #9fa39edarkgray |
| Accent | #0d37f2blue | #0d37f2blue |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #bd2514firebrick | #ec5746tomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #f20d37crimson | #f20d37crimson |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.09:1 | AAA |
| Text on card | 19.87:1 | AAA |
| Primary button | 4.28:1 | AA Large |
| Secondary button | 9.66:1 | AAA |
| Muted text | 4.65:1 | AA |
| Accent | 7.38:1 | AAA |
| Destructive | 6.10:1 | AA |
| Text on background | 18.92:1 | AAA |
| Text on card | 19.24:1 | AAA |
| Primary button | 4.28:1 | AA Large |
| Secondary button | 9.66:1 | AAA |
| Muted text | 5.52:1 | AA |
| Accent | 7.38:1 | AAA |
| Destructive | 6.00:1 | AA |
Paste this into your globals.css to use Collateral in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.135 0.021 5.75);
--muted: oklch(0.895 0.027 139.964);
--muted-foreground: oklch(0.487 0.011 139.972);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.135 0.021 5.75);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.121 0.018 4.775);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.61 0.242 22.569);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.838 0.276 141.386);
--secondary-foreground: oklch(0.274 0.084 140.046);
--accent: oklch(0.476 0.273 264.764);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.519 0.19 30.512);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.61 0.242 22.569);
--chart-1: oklch(0.61 0.242 22.569);
--chart-2: oklch(0.838 0.276 141.386);
--chart-3: oklch(0.476 0.273 264.764);
--chart-4: oklch(0.843 0.271 141.078);
--chart-5: oklch(0.616 0.246 23.173);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.139 0.013 5.202);
--foreground: oklch(0.983 0.003 4.399);
--muted: oklch(0.286 0.035 139.909);
--muted-foreground: oklch(0.712 0.01 139.979);
--popover: oklch(0.139 0.013 5.202);
--popover-foreground: oklch(0.983 0.003 4.399);
--card: oklch(0.15 0.015 6.524);
--card-foreground: oklch(0.991 0.002 4.355);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.61 0.242 22.569);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.838 0.276 141.386);
--secondary-foreground: oklch(0.274 0.084 140.046);
--accent: oklch(0.476 0.273 264.764);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.652 0.187 29.392);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.61 0.242 22.569);
--chart-1: oklch(0.61 0.242 22.569);
--chart-2: oklch(0.838 0.276 141.386);
--chart-3: oklch(0.476 0.273 264.764);
--chart-4: oklch(0.843 0.271 141.078);
--chart-5: oklch(0.616 0.246 23.173);
}