Constant is a shadcn/ui theme built around a neutral gray primary color (#44434c) with neutral gray accents (#434c44). The light mode uses a neutral background (#fcfbfd). Dark mode keeps the neutral gray primary (#44434c) on an indigo-tinted background (#060410).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfbfdsnow | #060410black |
| Foreground | #060411black | #ffffffwhite |
| Card | #f9f8fcghostwhite | #070514black |
| Card foreground | #04030cblack | #ffffffwhite |
| Popover | #f9f8fcghostwhite | #070514black |
| Popover foreground | #04030cblack | #ffffffwhite |
| Primary | #44434cdarkslategray | #44434cdarkslategray |
| Primary foreground | #dfdfe2gainsboro | #dfdfe2gainsboro |
| Secondary | #4c4443darkslategray | #4c4443darkslategray |
| Secondary foreground | #e2dfdfgainsboro | #e2dfdfgainsboro |
| Muted | #ebe6e5linen | #1a1514black |
| Muted foreground | #6c5551dimgray | #ae9793rosybrown |
| Accent | #434c44darkslategray | #434c44darkslategray |
| Accent foreground | #dfe2dfgainsboro | #dfe2dfgainsboro |
| Destructive | #620d04maroon | #f5220ared |
| Destructive foreground | #fba69dlightsalmon | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #44434cdarkslategray | #44434cdarkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.75:1 | AAA |
| Text on card | 19.38:1 | AAA |
| Primary button | 7.31:1 | AAA |
| Secondary button | 7.13:1 | AAA |
| Muted text | 5.55:1 | AA |
| Accent | 6.84:1 | AA |
| Destructive | 6.98:1 | AA |
| Text on background | 20.32:1 | AAA |
| Text on card | 20.15:1 | AAA |
| Primary button | 7.31:1 | AAA |
| Secondary button | 7.13:1 | AAA |
| Muted text | 6.59:1 | AA |
| Accent | 6.84:1 | AA |
| Destructive | 4.11:1 | AA Large |
Paste this into your globals.css to use Constant in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.003 293.257);
--foreground: oklch(0.12 0.032 290.146);
--muted: oklch(0.929 0.006 29.488);
--muted-foreground: oklch(0.472 0.031 29.841);
--popover: oklch(0.981 0.005 293.207);
--popover-foreground: oklch(0.108 0.027 291.008);
--card: oklch(0.981 0.005 293.207);
--card-foreground: oklch(0.108 0.027 291.008);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.388 0.014 292.6);
--primary-foreground: oklch(0.904 0.005 293.202);
--secondary: oklch(0.395 0.01 29.576);
--secondary-foreground: oklch(0.906 0.003 29.481);
--accent: oklch(0.405 0.016 149.709);
--accent-foreground: oklch(0.91 0.006 150.164);
--destructive: oklch(0.321 0.118 30.945);
--destructive-foreground: oklch(0.807 0.102 26.496);
--ring: oklch(0.388 0.014 292.6);
--chart-1: oklch(0.388 0.014 292.6);
--chart-2: oklch(0.395 0.01 29.576);
--chart-3: oklch(0.405 0.016 149.709);
--chart-4: oklch(0.423 0.011 29.578);
--chart-5: oklch(0.382 0.022 292.217);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.121 0.031 290.305);
--foreground: oklch(1 0 180);
--muted: oklch(0.201 0.008 29.673);
--muted-foreground: oklch(0.696 0.027 29.656);
--popover: oklch(0.131 0.035 289.233);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.131 0.035 289.233);
--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.388 0.014 292.6);
--primary-foreground: oklch(0.904 0.005 293.202);
--secondary: oklch(0.395 0.01 29.576);
--secondary-foreground: oklch(0.906 0.003 29.481);
--accent: oklch(0.405 0.016 149.709);
--accent-foreground: oklch(0.91 0.006 150.164);
--destructive: oklch(0.619 0.241 30.366);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.388 0.014 292.6);
--chart-1: oklch(0.388 0.014 292.6);
--chart-2: oklch(0.395 0.01 29.576);
--chart-3: oklch(0.405 0.016 149.709);
--chart-4: oklch(0.423 0.011 29.578);
--chart-5: oklch(0.382 0.022 292.217);
}