Topic is a shadcn/ui theme built around a muted blue primary color (#8f97ae) with muted indigo accents (#958fae). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted blue primary (#8f97ae) on a neutral background (#020203).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #020203black |
| Foreground | #010309black | #f9f9fbghostwhite |
| Card | #fcfcfcsnow | #030407black |
| Card foreground | #010205black | #fcfcfdwhite |
| Popover | #fcfcfcsnow | #030407black |
| Popover foreground | #010205black | #fcfcfdwhite |
| Primary | #8f97aedarkgray | #8f97aedarkgray |
| Primary foreground | #040506black | #040506black |
| Secondary | #8fa7aedarkgray | #8fa7aedarkgray |
| Secondary foreground | #040606black | #040606black |
| Muted | #e8f0f3lavender | #0c1517black |
| Muted foreground | #5e5e5edimgray | #a1a1a1darkgray |
| Accent | #958faedarkgray | #958faedarkgray |
| Accent foreground | #050406black | #050406black |
| Destructive | #8d3501saddlebrown | #fd7e35coral |
| Destructive foreground | #fed8c2peachpuff | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #8f97aedarkgray | #8f97aedarkgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.62:1 | AAA |
| Text on card | 20.30:1 | AAA |
| Primary button | 7.01:1 | AAA |
| Secondary button | 8.01:1 | AAA |
| Muted text | 5.62:1 | AA |
| Accent | 6.62:1 | AA |
| Destructive | 5.98:1 | AA |
| Text on background | 19.71:1 | AAA |
| Text on card | 19.95:1 | AAA |
| Primary button | 7.01:1 | AAA |
| Secondary button | 8.01:1 | AAA |
| Muted text | 7.15:1 | AAA |
| Accent | 6.62:1 | AA |
| Destructive | 8.22:1 | AAA |
Paste this into your globals.css to use Topic in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.1 0.021 256.663);
--muted: oklch(0.95 0.01 216.057);
--muted-foreground: oklch(0.483 0 180);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.079 0.017 256.663);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.079 0.017 256.663);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.678 0.034 268.362);
--primary-foreground: oklch(0.113 0.004 266.918);
--secondary: oklch(0.712 0.029 216.277);
--secondary-foreground: oklch(0.117 0.004 214.597);
--accent: oklch(0.665 0.046 295.052);
--accent-foreground: oklch(0.111 0.006 296.161);
--destructive: oklch(0.448 0.132 43.078);
--destructive-foreground: oklch(0.91 0.052 51.854);
--ring: oklch(0.678 0.034 268.362);
--chart-1: oklch(0.678 0.034 268.362);
--chart-2: oklch(0.712 0.029 216.277);
--chart-3: oklch(0.665 0.046 295.052);
--chart-4: oklch(0.735 0.026 216.234);
--chart-5: oklch(0.674 0.041 268.259);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.087 0.007 264.537);
--foreground: oklch(0.983 0.002 268.774);
--muted: oklch(0.188 0.014 216.718);
--muted-foreground: oklch(0.708 0 158.199);
--popover: oklch(0.11 0.009 264.537);
--popover-foreground: oklch(0.992 0.001 268.782);
--card: oklch(0.11 0.009 264.537);
--card-foreground: oklch(0.992 0.001 268.782);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.678 0.034 268.362);
--primary-foreground: oklch(0.113 0.004 266.918);
--secondary: oklch(0.712 0.029 216.277);
--secondary-foreground: oklch(0.117 0.004 214.597);
--accent: oklch(0.665 0.046 295.052);
--accent-foreground: oklch(0.111 0.006 296.161);
--destructive: oklch(0.729 0.175 47.124);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.678 0.034 268.362);
--chart-1: oklch(0.678 0.034 268.362);
--chart-2: oklch(0.712 0.029 216.277);
--chart-3: oklch(0.665 0.046 295.052);
--chart-4: oklch(0.735 0.026 216.234);
--chart-5: oklch(0.674 0.041 268.259);
}