Button is a shadcn/ui theme built around a muted deep blue primary color (#0d0e17) with muted deep violet accents (#110d17). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep blue primary (#0d0e17) on a blue-tinted background (#06070f).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #06070fblack |
| Foreground | #02040dblack | #f4f5fawhitesmoke |
| Card | #fcfcfcsnow | #070813black |
| Card foreground | #020309black | #f8f8fcghostwhite |
| Popover | #fcfcfcsnow | #070813black |
| Popover foreground | #020309black | #f8f8fcghostwhite |
| Primary | #0d0e17black | #0d0e17black |
| Primary foreground | #949ac2darkgray | #949ac2darkgray |
| Secondary | #0d1317black | #0d1317black |
| Secondary foreground | #94b1c2darkgray | #94b1c2darkgray |
| Muted | #d8dcdfgainsboro | #202527darkslategray |
| Muted foreground | #434c51darkslategray | #aeb7bcsilver |
| Accent | #110d17black | #110d17black |
| Accent foreground | #a594c2darkgray | #a594c2darkgray |
| Destructive | #b11f02firebrick | #fd5230tomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #0d0e17black | #0d0e17black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.47:1 | AAA |
| Text on card | 20.15:1 | AAA |
| Primary button | 7.00:1 | AAA |
| Secondary button | 8.30:1 | AAA |
| Muted text | 6.37:1 | AA |
| Accent | 6.96:1 | AA |
| Destructive | 6.86:1 | AA |
| Text on background | 18.48:1 | AAA |
| Text on card | 18.79:1 | AAA |
| Primary button | 7.00:1 | AAA |
| Secondary button | 8.30:1 | AAA |
| Muted text | 7.61:1 | AAA |
| Accent | 6.96:1 | AA |
| Destructive | 6.42:1 | AA |
Paste this into your globals.css to use Button in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.109 0.026 270.698);
--muted: oklch(0.893 0.006 232.676);
--muted-foreground: oklch(0.41 0.014 233.082);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.095 0.022 270.586);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.095 0.022 270.586);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.168 0.018 277.54);
--primary-foreground: oklch(0.696 0.058 277.94);
--secondary: oklch(0.183 0.012 233.676);
--secondary-foreground: oklch(0.744 0.04 233.441);
--accent: oklch(0.169 0.02 301.041);
--accent-foreground: oklch(0.697 0.068 301.428);
--destructive: oklch(0.49 0.184 32.191);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.168 0.018 277.54);
--chart-1: oklch(0.168 0.018 277.54);
--chart-2: oklch(0.183 0.012 233.676);
--chart-3: oklch(0.169 0.02 301.041);
--chart-4: oklch(0.217 0.016 233.878);
--chart-5: oklch(0.167 0.02 277.289);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.13 0.019 274.921);
--foreground: oklch(0.972 0.007 279.236);
--muted: oklch(0.26 0.008 233.055);
--muted-foreground: oklch(0.774 0.012 232.797);
--popover: oklch(0.141 0.023 275.374);
--popover-foreground: oklch(0.981 0.004 279.272);
--card: oklch(0.141 0.023 275.374);
--card-foreground: oklch(0.981 0.004 279.272);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.168 0.018 277.54);
--primary-foreground: oklch(0.696 0.058 277.94);
--secondary: oklch(0.183 0.012 233.676);
--secondary-foreground: oklch(0.744 0.04 233.441);
--accent: oklch(0.169 0.02 301.041);
--accent-foreground: oklch(0.697 0.068 301.428);
--destructive: oklch(0.672 0.213 33.175);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.168 0.018 277.54);
--chart-1: oklch(0.168 0.018 277.54);
--chart-2: oklch(0.183 0.012 233.676);
--chart-3: oklch(0.169 0.02 301.041);
--chart-4: oklch(0.217 0.016 233.878);
--chart-5: oklch(0.167 0.02 277.289);
}