Viability is a shadcn/ui theme built around a vivid purple primary color (#e61adf) with muted light purple accents (#e3d8e3). The light mode uses a neutral background (#fdf7fd). Dark mode keeps the vivid purple primary (#e61adf) on a neutral background (#040104).
| Token | Light | Dark |
|---|---|---|
| Background | #fdf7fdsnow | #040104black |
| Foreground | #090208black | #fbf9fbsnow |
| Card | #fdf7fdsnow | #040104black |
| Card foreground | #090208black | #fbf9fbsnow |
| Popover | #fdf7fdsnow | #040104black |
| Popover foreground | #090208black | #fbf9fbsnow |
| Primary | #e61adfmagenta | #e61adfmagenta |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #e3d8e3gainsboro | #1b131ablack |
| Secondary foreground | #513950darkslategray | #bda3bcdarkgray |
| Muted | #e8d9e8gainsboro | #261726black |
| Muted foreground | #514351darkslategray | #bcaebcsilver |
| Accent | #e3d8e3gainsboro | #1b131ablack |
| Accent foreground | #513950darkslategray | #bda3bcdarkgray |
| Destructive | #bd1b0ffirebrick | #ed2f21crimson |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #e61adfmagenta | #e61adfmagenta |
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 | 3.78:1 | AA Large |
| Secondary button | 7.42:1 | AAA |
| Muted text | 6.82:1 | AA |
| Accent | 7.42:1 | AAA |
| Destructive | 6.32:1 | AA |
| Text on background | 19.80:1 | AAA |
| Text on card | 19.80:1 | AAA |
| Primary button | 3.78:1 | AA Large |
| Secondary button | 7.89:1 | AAA |
| Muted text | 8.04:1 | AAA |
| Accent | 7.89:1 | AAA |
| Destructive | 4.17:1 | AA Large |
Paste this into your globals.css to use Viability in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.982 0.011 326.634);
--foreground: oklch(0.107 0.031 328.323);
--muted: oklch(0.901 0.026 326.786);
--muted-foreground: oklch(0.402 0.031 327.175);
--popover: oklch(0.982 0.011 326.634);
--popover-foreground: oklch(0.107 0.031 328.323);
--card: oklch(0.982 0.011 326.634);
--card-foreground: oklch(0.107 0.031 328.323);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.649 0.286 329.946);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.895 0.019 326.724);
--secondary-foreground: oklch(0.38 0.049 327.584);
--accent: oklch(0.895 0.019 326.724);
--accent-foreground: oklch(0.38 0.049 327.584);
--destructive: oklch(0.511 0.196 29.688);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.649 0.286 329.946);
--chart-1: oklch(0.649 0.286 329.946);
--chart-2: oklch(0.895 0.019 326.724);
--chart-3: oklch(0.895 0.019 326.724);
--chart-4: oklch(0.919 0.015 326.677);
--chart-5: oklch(0.656 0.292 329.992);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.087 0.018 327.904);
--foreground: oklch(0.984 0.004 326.574);
--muted: oklch(0.231 0.036 327.789);
--muted-foreground: oklch(0.767 0.026 326.83);
--popover: oklch(0.087 0.018 327.904);
--popover-foreground: oklch(0.984 0.004 326.574);
--card: oklch(0.087 0.018 327.904);
--card-foreground: oklch(0.984 0.004 326.574);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.649 0.286 329.946);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.2 0.018 327.286);
--secondary-foreground: oklch(0.746 0.045 327.046);
--accent: oklch(0.2 0.018 327.286);
--accent-foreground: oklch(0.746 0.045 327.046);
--destructive: oklch(0.613 0.225 29.456);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.649 0.286 329.946);
--chart-1: oklch(0.649 0.286 329.946);
--chart-2: oklch(0.2 0.018 327.286);
--chart-3: oklch(0.2 0.018 327.286);
--chart-4: oklch(0.233 0.023 327.361);
--chart-5: oklch(0.656 0.292 329.992);
}