Metallic is a shadcn/ui theme built around a deep violet primary color (#301867) with deep green accents (#506718). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep violet primary (#301867) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #040308black | #ffffffwhite |
| Card | #ffffffwhite | #000000black |
| Card foreground | #040308black | #ffffffwhite |
| Popover | #ffffffwhite | #000000black |
| Popover foreground | #040308black | #ffffffwhite |
| Primary | #301867midnightblue | #301867midnightblue |
| Primary foreground | #cfc1f0thistle | #cfc1f0thistle |
| Secondary | #506718darkolivegreen | #506718darkolivegreen |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #dfe4d3gainsboro | #272c1bdarkslategray |
| Muted foreground | #636b52dimgray | #a6ad94darkgray |
| Accent | #506718darkolivegreen | #506718darkolivegreen |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #c12c15firebrick | #e6351aorangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #301867midnightblue | #301867midnightblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.55:1 | AAA |
| Text on card | 20.55:1 | AAA |
| Primary button | 8.61:1 | AAA |
| Secondary button | 6.36:1 | AA |
| Muted text | 4.28:1 | AA Large |
| Accent | 6.36:1 | AA |
| Destructive | 5.77:1 | AA |
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 8.61:1 | AAA |
| Secondary button | 6.36:1 | AA |
| Muted text | 6.17:1 | AA |
| Accent | 6.36:1 | AA |
| Destructive | 4.31:1 | AA Large |
Paste this into your globals.css to use Metallic in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.101 0.019 300.227);
--muted: oklch(0.909 0.023 120.457);
--muted-foreground: oklch(0.513 0.038 121.322);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.101 0.019 300.227);
--card: oklch(1 0 180);
--card-foreground: oklch(0.101 0.019 300.227);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.298 0.129 290);
--primary-foreground: oklch(0.838 0.067 298.677);
--secondary: oklch(0.479 0.107 125.035);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.479 0.107 125.035);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.531 0.188 31.615);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.298 0.129 290);
--chart-1: oklch(0.298 0.129 290);
--chart-2: oklch(0.479 0.107 125.035);
--chart-3: oklch(0.479 0.107 125.035);
--chart-4: oklch(0.519 0.117 125.123);
--chart-5: oklch(0.296 0.134 289.266);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(1 0 180);
--muted: oklch(0.283 0.029 121.859);
--muted-foreground: oklch(0.735 0.035 120.856);
--popover: oklch(0 0 0);
--popover-foreground: oklch(1 0 180);
--card: oklch(0 0 0);
--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.298 0.129 290);
--primary-foreground: oklch(0.838 0.067 298.677);
--secondary: oklch(0.479 0.107 125.035);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.479 0.107 125.035);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.603 0.216 31.587);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.298 0.129 290);
--chart-1: oklch(0.298 0.129 290);
--chart-2: oklch(0.479 0.107 125.035);
--chart-3: oklch(0.479 0.107 125.035);
--chart-4: oklch(0.519 0.117 125.123);
--chart-5: oklch(0.296 0.134 289.266);
}