Analogy is a shadcn/ui theme built around a purple primary color (#c985d5) with muted light purple accents (#d0bbd3). The light mode uses a neutral background (#fcf7fd). Dark mode keeps the purple primary (#c985d5) on a neutral background (#030203).
| Token | Light | Dark |
|---|---|---|
| Background | #fcf7fdghostwhite | #030203black |
| Foreground | #0b030cblack | #ffffffwhite |
| Card | #faf3fcghostwhite | #060407black |
| Card foreground | #070208black | #ffffffwhite |
| Popover | #faf3fcghostwhite | #060407black |
| Popover foreground | #070208black | #ffffffwhite |
| Primary | #c985d5orchid | #c985d5orchid |
| Primary foreground | #1b0a1eblack | #1b0a1eblack |
| Secondary | #e2d9e3gainsboro | #272528darkslategray |
| Secondary foreground | #4d3a50darkslategray | #c1bdc2silver |
| Muted | #e7e4e7gainsboro | #1b181bblack |
| Muted foreground | #554158darkslategray | #bba7besilver |
| Accent | #d0bbd3thistle | #403342darkslategray |
| Accent foreground | #352438darkslategray | #d8ced9lightgrey |
| Destructive | #d90b08red | #f10d09red |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #c985d5orchid | #c985d5orchid |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.23:1 | AAA |
| Text on card | 18.91:1 | AAA |
| Primary button | 7.06:1 | AAA |
| Secondary button | 7.46:1 | AAA |
| Muted text | 7.28:1 | AAA |
| Accent | 7.99:1 | AAA |
| Destructive | 5.26:1 | AA |
| Text on background | 20.72:1 | AAA |
| Text on card | 20.46:1 | AAA |
| Primary button | 7.06:1 | AAA |
| Secondary button | 8.21:1 | AAA |
| Muted text | 7.87:1 | AAA |
| Accent | 7.76:1 | AAA |
| Destructive | 4.37:1 | AA Large |
Paste this into your globals.css to use Analogy in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.982 0.009 321.085);
--foreground: oklch(0.122 0.029 322.661);
--muted: oklch(0.922 0.005 321.077);
--muted-foreground: oklch(0.405 0.045 321.29);
--popover: oklch(0.973 0.013 321.095);
--popover-foreground: oklch(0.106 0.025 322.959);
--card: oklch(0.973 0.013 321.095);
--card-foreground: oklch(0.106 0.025 322.959);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.715 0.134 321.4);
--primary-foreground: oklch(0.183 0.046 321.443);
--secondary: oklch(0.894 0.017 321.107);
--secondary-foreground: oklch(0.377 0.044 321.3);
--accent: oklch(0.816 0.041 321.173);
--accent-foreground: oklch(0.289 0.043 321.35);
--destructive: oklch(0.558 0.225 29.111);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.715 0.134 321.4);
--chart-1: oklch(0.715 0.134 321.4);
--chart-2: oklch(0.894 0.017 321.107);
--chart-3: oklch(0.816 0.041 321.173);
--chart-4: oklch(0.919 0.013 321.096);
--chart-5: oklch(0.714 0.142 321.412);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.088 0.01 322.024);
--foreground: oklch(1 0 180);
--muted: oklch(0.213 0.007 321.137);
--muted-foreground: oklch(0.752 0.039 321.176);
--popover: oklch(0.111 0.013 322.024);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.111 0.013 322.024);
--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.715 0.134 321.4);
--primary-foreground: oklch(0.183 0.046 321.443);
--secondary: oklch(0.267 0.007 321.12);
--secondary-foreground: oklch(0.802 0.009 321.088);
--accent: oklch(0.341 0.031 321.255);
--accent-foreground: oklch(0.862 0.019 321.112);
--destructive: oklch(0.605 0.244 29.131);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.715 0.134 321.4);
--chart-1: oklch(0.715 0.134 321.4);
--chart-2: oklch(0.267 0.007 321.12);
--chart-3: oklch(0.341 0.031 321.255);
--chart-4: oklch(0.298 0.008 321.122);
--chart-5: oklch(0.714 0.142 321.412);
}