Consistency is a shadcn/ui theme built around a vivid light blue primary color (#c8d3fe) with muted light blue accents (#d7d9e0). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid light blue primary (#c8d3fe) on a blue-tinted background (#050710).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #050710black |
| Foreground | #020308black | #ffffffwhite |
| Card | #ffffffwhite | #050710black |
| Card foreground | #020308black | #ffffffwhite |
| Popover | #ffffffwhite | #050710black |
| Popover foreground | #020308black | #ffffffwhite |
| Primary | #c8d3felavender | #c8d3felavender |
| Primary foreground | #021f92darkblue | #021f92darkblue |
| Secondary | #d7d9e0gainsboro | #23252fdarkslategray |
| Secondary foreground | #3a3e4adarkslategray | #b9bccbsilver |
| Muted | #d3d7e3gainsboro | #1c1f2cblack |
| Muted foreground | #606062dimgray | #9d9e9fdarkgray |
| Accent | #d7d9e0gainsboro | #23252fdarkslategray |
| Accent foreground | #3a3e4adarkslategray | #b9bccbsilver |
| Destructive | #7a0705maroon | #f00e0ared |
| Destructive foreground | #fcb7b6lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #c8d3felavender | #c8d3felavender |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.60:1 | AAA |
| Text on card | 20.60:1 | AAA |
| Primary button | 8.77:1 | AAA |
| Secondary button | 7.55:1 | AAA |
| Muted text | 4.35:1 | AA Large |
| Accent | 7.55:1 | AAA |
| Destructive | 6.74:1 | AA |
| Text on background | 20.11:1 | AAA |
| Text on card | 20.11:1 | AAA |
| Primary button | 8.77:1 | AAA |
| Secondary button | 8.07:1 | AAA |
| Muted text | 6.11:1 | AA |
| Accent | 8.07:1 | AAA |
| Destructive | 4.40:1 | AA Large |
Paste this into your globals.css to use Consistency in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.101 0.018 267.159);
--muted: oklch(0.879 0.018 274.783);
--muted-foreground: oklch(0.49 0.002 274.972);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.101 0.018 267.159);
--card: oklch(1 0 180);
--card-foreground: oklch(0.101 0.018 267.159);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.872 0.062 274.053);
--primary-foreground: oklch(0.329 0.186 264.303);
--secondary: oklch(0.885 0.01 274.901);
--secondary-foreground: oklch(0.364 0.022 274.195);
--accent: oklch(0.885 0.01 274.901);
--accent-foreground: oklch(0.364 0.022 274.195);
--destructive: oklch(0.369 0.146 28.921);
--destructive-foreground: oklch(0.842 0.081 20.006);
--ring: oklch(0.872 0.062 274.053);
--chart-1: oklch(0.872 0.062 274.053);
--chart-2: oklch(0.885 0.01 274.901);
--chart-3: oklch(0.885 0.01 274.901);
--chart-4: oklch(0.91 0.007 274.934);
--chart-5: oklch(0.87 0.063 274.017);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.131 0.02 269.579);
--foreground: oklch(1 0 180);
--muted: oklch(0.242 0.025 273.555);
--muted-foreground: oklch(0.698 0.002 274.994);
--popover: oklch(0.131 0.02 269.579);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.131 0.02 269.579);
--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.872 0.062 274.053);
--primary-foreground: oklch(0.329 0.186 264.303);
--secondary: oklch(0.267 0.019 274.067);
--secondary-foreground: oklch(0.798 0.021 274.697);
--accent: oklch(0.267 0.019 274.067);
--accent-foreground: oklch(0.798 0.021 274.697);
--destructive: oklch(0.603 0.243 29.102);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.872 0.062 274.053);
--chart-1: oklch(0.872 0.062 274.053);
--chart-2: oklch(0.267 0.019 274.067);
--chart-3: oklch(0.267 0.019 274.067);
--chart-4: oklch(0.296 0.022 274.018);
--chart-5: oklch(0.87 0.063 274.017);
}