Cation is a shadcn/ui theme built around a vivid violet primary color (#6809dc) with muted light violet accents (#eae8ee). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the vivid violet primary (#6809dc) on a neutral background (#020203).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfbfewhite | #020203black |
| Foreground | #050109black | #faf8fcghostwhite |
| Card | #faf7fdghostwhite | #050307black |
| Card foreground | #020104black | #fcfbfdsnow |
| Popover | #faf7fdghostwhite | #050307black |
| Popover foreground | #020104black | #fcfbfdsnow |
| Primary | #6809dcdarkviolet | #6809dcdarkviolet |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #eae8eelavender | #141316black |
| Secondary foreground | #50455edarkslategray | #ada9b2darkgray |
| Muted | #efecf3whitesmoke | #0f0c13black |
| Muted foreground | #56515ddimgray | #a8a2aedarkgray |
| Accent | #eae8eelavender | #141316black |
| Accent foreground | #50455edarkslategray | #ada9b2darkgray |
| Destructive | #db180ared | #f42d1forangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #6809dcdarkviolet | #6809dcdarkviolet |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.08:1 | AAA |
| Text on card | 19.60:1 | AAA |
| Primary button | 7.87:1 | AAA |
| Secondary button | 7.31:1 | AAA |
| Muted text | 6.60:1 | AA |
| Accent | 7.31:1 | AAA |
| Destructive | 5.05:1 | AA |
| Text on background | 19.66:1 | AAA |
| Text on card | 19.87:1 | AAA |
| Primary button | 7.87:1 | AAA |
| Secondary button | 8.00:1 | AAA |
| Muted text | 7.80:1 | AAA |
| Accent | 8.00:1 | AAA |
| Destructive | 3.99:1 | AA Large |
Paste this into your globals.css to use Cation in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.004 306.377);
--foreground: oklch(0.095 0.031 308.435);
--muted: oklch(0.949 0.009 306.306);
--muted-foreground: oklch(0.443 0.021 305.831);
--popover: oklch(0.98 0.008 306.324);
--popover-foreground: oklch(0.076 0.024 308.435);
--card: oklch(0.98 0.008 306.324);
--card-foreground: oklch(0.076 0.024 308.435);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.472 0.26 291.64);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.933 0.009 306.31);
--secondary-foreground: oklch(0.413 0.042 305.107);
--accent: oklch(0.933 0.009 306.31);
--accent-foreground: oklch(0.413 0.042 305.107);
--destructive: oklch(0.567 0.223 29.757);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.472 0.26 291.64);
--chart-1: oklch(0.472 0.26 291.64);
--chart-2: oklch(0.933 0.009 306.31);
--chart-3: oklch(0.933 0.009 306.31);
--chart-4: oklch(0.959 0.005 306.357);
--chart-5: oklch(0.474 0.264 290.953);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.085 0.01 307.175);
--foreground: oklch(0.981 0.006 306.354);
--muted: oklch(0.162 0.014 305.31);
--muted-foreground: oklch(0.721 0.018 306.103);
--popover: oklch(0.107 0.013 307.175);
--popover-foreground: oklch(0.991 0.003 306.392);
--card: oklch(0.107 0.013 307.175);
--card-foreground: oklch(0.991 0.003 306.392);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.472 0.26 291.64);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.19 0.005 306.081);
--secondary-foreground: oklch(0.74 0.015 306.174);
--accent: oklch(0.19 0.005 306.081);
--accent-foreground: oklch(0.74 0.015 306.174);
--destructive: oklch(0.625 0.233 29.549);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.472 0.26 291.64);
--chart-1: oklch(0.472 0.26 291.64);
--chart-2: oklch(0.19 0.005 306.081);
--chart-3: oklch(0.19 0.005 306.081);
--chart-4: oklch(0.223 0.007 306.036);
--chart-5: oklch(0.474 0.264 290.953);
}