Hydrogen is a shadcn/ui theme built around a vivid blue primary color (#8b97f4) with neutral gray accents (#cdcdd0). The light mode uses a neutral background (#f7f8fd). Dark mode keeps the vivid blue primary (#8b97f4) on a blue-tinted background (#06070e).
| Token | Light | Dark |
|---|---|---|
| Background | #f7f8fdghostwhite | #06070eblack |
| Foreground | #040616black | #f8f8fcghostwhite |
| Card | #f7f8fdghostwhite | #06070eblack |
| Card foreground | #040616black | #f8f8fcghostwhite |
| Popover | #f7f8fdghostwhite | #06070eblack |
| Popover foreground | #040616black | #f8f8fcghostwhite |
| Primary | #8b97f4cornflowerblue | #8b97f4cornflowerblue |
| Primary foreground | #070e46midnightblue | #070e46midnightblue |
| Secondary | #cdcdd0lightgrey | #2e2f38darkslategray |
| Secondary foreground | #343437darkslategray | #c7c8d1lightgrey |
| Muted | #e5e5eblavender | #14141ablack |
| Muted foreground | #5d5f69dimgray | #9697a2darkgray |
| Accent | #cdcdd0lightgrey | #2e2f38darkslategray |
| Accent foreground | #343437darkslategray | #c7c8d1lightgrey |
| Destructive | #850f0fmaroon | #e83030crimson |
| Destructive foreground | #f9cdcdpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #8b97f4cornflowerblue | #8b97f4cornflowerblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.98:1 | AAA |
| Text on card | 18.98:1 | AAA |
| Primary button | 6.75:1 | AA |
| Secondary button | 7.84:1 | AAA |
| Muted text | 5.07:1 | AA |
| Accent | 7.84:1 | AAA |
| Destructive | 7.06:1 | AAA |
| Text on background | 18.98:1 | AAA |
| Text on card | 18.98:1 | AAA |
| Primary button | 6.75:1 | AA |
| Secondary button | 7.97:1 | AAA |
| Muted text | 6.32:1 | AA |
| Accent | 7.97:1 | AAA |
| Destructive | 4.28:1 | AA Large |
Paste this into your globals.css to use Hydrogen in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.98 0.006 280.232);
--foreground: oklch(0.13 0.036 272.303);
--muted: oklch(0.924 0.008 280.19);
--muted-foreground: oklch(0.488 0.017 279.768);
--popover: oklch(0.98 0.006 280.232);
--popover-foreground: oklch(0.13 0.036 272.303);
--card: oklch(0.98 0.006 280.232);
--card-foreground: oklch(0.13 0.036 272.303);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.706 0.135 276.644);
--primary-foreground: oklch(0.209 0.102 268.483);
--secondary: oklch(0.85 0.004 280.265);
--secondary-foreground: oklch(0.327 0.005 280.088);
--accent: oklch(0.85 0.004 280.265);
--accent-foreground: oklch(0.327 0.005 280.088);
--destructive: oklch(0.395 0.151 27.77);
--destructive-foreground: oklch(0.885 0.051 18.157);
--ring: oklch(0.706 0.135 276.644);
--chart-1: oklch(0.706 0.135 276.644);
--chart-2: oklch(0.85 0.004 280.265);
--chart-3: oklch(0.85 0.004 280.265);
--chart-4: oklch(0.874 0.003 280.277);
--chart-5: oklch(0.703 0.14 276.463);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.131 0.018 276.496);
--foreground: oklch(0.981 0.004 280.26);
--muted: oklch(0.195 0.012 279.266);
--muted-foreground: oklch(0.679 0.015 279.965);
--popover: oklch(0.131 0.018 276.496);
--popover-foreground: oklch(0.981 0.004 280.26);
--card: oklch(0.131 0.018 276.496);
--card-foreground: oklch(0.981 0.004 280.26);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.706 0.135 276.644);
--primary-foreground: oklch(0.209 0.102 268.483);
--secondary: oklch(0.308 0.016 279.455);
--secondary-foreground: oklch(0.835 0.013 280.093);
--accent: oklch(0.308 0.016 279.455);
--accent-foreground: oklch(0.835 0.013 280.093);
--destructive: oklch(0.607 0.218 26.743);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.706 0.135 276.644);
--chart-1: oklch(0.706 0.135 276.644);
--chart-2: oklch(0.308 0.016 279.455);
--chart-3: oklch(0.308 0.016 279.455);
--chart-4: oklch(0.336 0.018 279.426);
--chart-5: oklch(0.703 0.14 276.463);
}