Constant is a shadcn/ui theme built around a light blue primary color (#f2f3fd) with light yellow accents (#fdfcf2). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the light blue primary (#f2f3fd) on a blue-tinted background (#05050a).
| Token | Light | Dark |
|---|---|---|
| Background | #f8f8fcghostwhite | #05050ablack |
| Foreground | #02030eblack | #f9f9fbghostwhite |
| Card | #f8f8fcghostwhite | #05050ablack |
| Card foreground | #02030eblack | #f9f9fbghostwhite |
| Popover | #f8f8fcghostwhite | #05050ablack |
| Popover foreground | #02030eblack | #f9f9fbghostwhite |
| Primary | #f2f3fdaliceblue | #f2f3fdaliceblue |
| Primary foreground | #1926a4darkblue | #1926a4darkblue |
| Secondary | #fdfcf2floralwhite | #fdfcf2floralwhite |
| Secondary foreground | #4b450bdarkolivegreen | #4b450bdarkolivegreen |
| Muted | #eae8d7antiquewhite | #282615black |
| Muted foreground | #5b5b57dimgray | #a8a7a4darkgray |
| Accent | #fdfcf2floralwhite | #fdfcf2floralwhite |
| Accent foreground | #4b450bdarkolivegreen | #4b450bdarkolivegreen |
| Destructive | #b51503firebrick | #fb1d04red |
| Destructive foreground | #ffedeblinen | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #f2f3fdaliceblue | #f2f3fdaliceblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.40:1 | AAA |
| Text on card | 19.40:1 | AAA |
| Primary button | 10.23:1 | AAA |
| Secondary button | 9.44:1 | AAA |
| Muted text | 5.51:1 | AA |
| Accent | 9.44:1 | AAA |
| Destructive | 6.05:1 | AA |
| Text on background | 19.31:1 | AAA |
| Text on card | 19.31:1 | AAA |
| Primary button | 10.23:1 | AAA |
| Secondary button | 9.44:1 | AAA |
| Muted text | 6.33:1 | AA |
| Accent | 9.44:1 | AAA |
| Destructive | 3.97:1 | AA Large |
Paste this into your globals.css to use Constant in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.98 0.005 281.201);
--foreground: oklch(0.102 0.032 270.276);
--muted: oklch(0.927 0.022 101.655);
--muted-foreground: oklch(0.469 0.005 101.459);
--popover: oklch(0.98 0.005 281.201);
--popover-foreground: oklch(0.102 0.032 270.276);
--card: oklch(0.98 0.005 281.201);
--card-foreground: oklch(0.102 0.032 270.276);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.966 0.014 281.057);
--primary-foreground: oklch(0.368 0.196 267.931);
--secondary: oklch(0.989 0.013 101.5);
--secondary-foreground: oklch(0.385 0.074 102.698);
--accent: oklch(0.989 0.013 101.5);
--accent-foreground: oklch(0.385 0.074 102.698);
--destructive: oklch(0.492 0.192 30.5);
--destructive-foreground: oklch(0.959 0.02 25.167);
--ring: oklch(0.966 0.014 281.057);
--chart-1: oklch(0.966 0.014 281.057);
--chart-2: oklch(0.989 0.013 101.5);
--chart-3: oklch(0.989 0.013 101.5);
--chart-4: oklch(1 0 180);
--chart-5: oklch(0.965 0.014 281.047);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.12 0.014 277.913);
--foreground: oklch(0.983 0.002 281.257);
--muted: oklch(0.265 0.028 102.7);
--muted-foreground: oklch(0.728 0.005 101.387);
--popover: oklch(0.12 0.014 277.913);
--popover-foreground: oklch(0.983 0.002 281.257);
--card: oklch(0.12 0.014 277.913);
--card-foreground: oklch(0.983 0.002 281.257);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.966 0.014 281.057);
--primary-foreground: oklch(0.368 0.196 267.931);
--secondary: oklch(0.989 0.013 101.5);
--secondary-foreground: oklch(0.385 0.074 102.698);
--accent: oklch(0.989 0.013 101.5);
--accent-foreground: oklch(0.385 0.074 102.698);
--destructive: oklch(0.628 0.248 30.267);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.966 0.014 281.057);
--chart-1: oklch(0.966 0.014 281.057);
--chart-2: oklch(0.989 0.013 101.5);
--chart-3: oklch(0.989 0.013 101.5);
--chart-4: oklch(1 0 180);
--chart-5: oklch(0.965 0.014 281.047);
}