Metric is a shadcn/ui theme built around a muted light blue primary color (#b7bbcd) with muted light yellow accents (#cdc8b7). The light mode uses a neutral background (#fbfcfe). Dark mode keeps the muted light blue primary (#b7bbcd) on a blue-tinted background (#03050c).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfcfewhite | #03050cblack |
| Foreground | #060914black | #fcfcfdwhite |
| Card | #fbfcfewhite | #03050cblack |
| Card foreground | #060914black | #fcfcfdwhite |
| Popover | #fbfcfewhite | #03050cblack |
| Popover foreground | #060914black | #fcfcfdwhite |
| Primary | #b7bbcdsilver | #b7bbcdsilver |
| Primary foreground | #212430darkslategray | #212430darkslategray |
| Secondary | #cdc8b7silver | #cdc8b7silver |
| Secondary foreground | #302d21darkslategray | #302d21darkslategray |
| Muted | #e3dfcegainsboro | #312c1cdarkslategray |
| Muted foreground | #6a6862dimgray | #9d9b95darkgray |
| Accent | #cdc8b7silver | #cdc8b7silver |
| Accent foreground | #302d21darkslategray | #302d21darkslategray |
| Destructive | #dd0e03red | #fc281dorangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #b7bbcdsilver | #b7bbcdsilver |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.33:1 | AAA |
| Text on card | 19.33:1 | AAA |
| Primary button | 8.09:1 | AAA |
| Secondary button | 8.25:1 | AAA |
| Muted text | 4.16:1 | AA Large |
| Accent | 8.25:1 | AAA |
| Destructive | 5.07:1 | AA |
| Text on background | 19.86:1 | AAA |
| Text on card | 19.86:1 | AAA |
| Primary button | 8.09:1 | AAA |
| Secondary button | 8.25:1 | AAA |
| Muted text | 4.99:1 | AA |
| Accent | 8.25:1 | AAA |
| Destructive | 3.85:1 | AA Large |
Paste this into your globals.css to use Metric in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.003 275.003);
--foreground: oklch(0.141 0.025 270.197);
--muted: oklch(0.902 0.023 95.312);
--muted-foreground: oklch(0.518 0.01 95.258);
--popover: oklch(0.99 0.003 275.003);
--popover-foreground: oklch(0.141 0.025 270.197);
--card: oklch(0.99 0.003 275.003);
--card-foreground: oklch(0.141 0.025 270.197);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.795 0.025 274.623);
--primary-foreground: oklch(0.264 0.022 273.828);
--secondary: oklch(0.833 0.025 95.356);
--secondary-foreground: oklch(0.297 0.021 95.676);
--accent: oklch(0.833 0.025 95.356);
--accent-foreground: oklch(0.297 0.021 95.676);
--destructive: oklch(0.567 0.228 29.6);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.795 0.025 274.623);
--chart-1: oklch(0.795 0.025 274.623);
--chart-2: oklch(0.833 0.025 95.356);
--chart-3: oklch(0.833 0.025 95.356);
--chart-4: oklch(0.854 0.021 95.312);
--chart-5: oklch(0.792 0.03 274.546);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.116 0.02 267.683);
--foreground: oklch(0.992 0.001 275.024);
--muted: oklch(0.294 0.028 95.782);
--muted-foreground: oklch(0.69 0.01 95.193);
--popover: oklch(0.116 0.02 267.683);
--popover-foreground: oklch(0.992 0.001 275.024);
--card: oklch(0.116 0.02 267.683);
--card-foreground: oklch(0.992 0.001 275.024);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.795 0.025 274.623);
--primary-foreground: oklch(0.264 0.022 273.828);
--secondary: oklch(0.833 0.025 95.356);
--secondary-foreground: oklch(0.297 0.021 95.676);
--accent: oklch(0.833 0.025 95.356);
--accent-foreground: oklch(0.297 0.021 95.676);
--destructive: oklch(0.635 0.242 29.225);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.795 0.025 274.623);
--chart-1: oklch(0.795 0.025 274.623);
--chart-2: oklch(0.833 0.025 95.356);
--chart-3: oklch(0.833 0.025 95.356);
--chart-4: oklch(0.854 0.021 95.312);
--chart-5: oklch(0.792 0.03 274.546);
}