Violet is a shadcn/ui theme built around a near-white primary color (#ffffff) with near-white accents (#ffffff). The light mode uses a neutral background (#fdfcfc). Dark mode keeps the near-white primary (#ffffff) on a red-tinted background (#0b0505).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfcfcsnow | #0b0505black |
| Foreground | #090202black | #fdfcfcsnow |
| Card | #fdfcfcsnow | #0b0505black |
| Card foreground | #090202black | #fdfcfcsnow |
| Popover | #fdfcfcsnow | #0b0505black |
| Popover foreground | #090202black | #fdfcfcsnow |
| Primary | #ffffffwhite | #ffffffwhite |
| Primary foreground | #333333darkslategray | #333333darkslategray |
| Secondary | #ffffffwhite | #ffffffwhite |
| Secondary foreground | #333333darkslategray | #333333darkslategray |
| Muted | #eae1e1gainsboro | #1e1515black |
| Muted foreground | #423d3ddarkslategray | #c2bdbdsilver |
| Accent | #ffffffwhite | #ffffffwhite |
| Accent foreground | #333333darkslategray | #333333darkslategray |
| Destructive | #d7300ffirebrick | #ef3a15orangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #ffffffwhite | #ffffffwhite |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.03:1 | AAA |
| Text on card | 20.03:1 | AAA |
| Primary button | 12.63:1 | AAA |
| Secondary button | 12.63:1 | AAA |
| Muted text | 8.30:1 | AAA |
| Accent | 12.63:1 | AAA |
| Destructive | 4.87:1 | AA |
| Text on background | 19.79:1 | AAA |
| Text on card | 19.79:1 | AAA |
| Primary button | 12.63:1 | AAA |
| Secondary button | 12.63:1 | AAA |
| Muted text | 9.65:1 | AAA |
| Accent | 12.63:1 | AAA |
| Destructive | 3.98:1 | AA Large |
Paste this into your globals.css to use Violet in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.002 17.19);
--foreground: oklch(0.1 0.023 22.205);
--muted: oklch(0.916 0.011 17.35);
--muted-foreground: oklch(0.366 0.007 17.48);
--popover: oklch(0.991 0.002 17.19);
--popover-foreground: oklch(0.1 0.023 22.205);
--card: oklch(0.991 0.002 17.19);
--card-foreground: oklch(0.1 0.023 22.205);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(1 0 180);
--primary-foreground: oklch(0.321 0 180);
--secondary: oklch(1 0 180);
--secondary-foreground: oklch(0.321 0 180);
--accent: oklch(1 0 180);
--accent-foreground: oklch(0.321 0 180);
--destructive: oklch(0.573 0.206 32.508);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(1 0 180);
--chart-1: oklch(1 0 180);
--chart-2: oklch(1 0 180);
--chart-3: oklch(1 0 180);
--chart-4: oklch(1.023 0 180);
--chart-5: oklch(1 0 180);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.123 0.014 19.26);
--foreground: oklch(0.992 0.001 17.172);
--muted: oklch(0.207 0.016 18.529);
--muted-foreground: oklch(0.802 0.006 17.276);
--popover: oklch(0.123 0.014 19.26);
--popover-foreground: oklch(0.992 0.001 17.172);
--card: oklch(0.123 0.014 19.26);
--card-foreground: oklch(0.992 0.001 17.172);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(1 0 180);
--primary-foreground: oklch(0.321 0 180);
--secondary: oklch(1 0 180);
--secondary-foreground: oklch(0.321 0 180);
--accent: oklch(1 0 180);
--accent-foreground: oklch(0.321 0 180);
--destructive: oklch(0.623 0.221 32.644);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(1 0 180);
--chart-1: oklch(1 0 180);
--chart-2: oklch(1 0 180);
--chart-3: oklch(1 0 180);
--chart-4: oklch(1.023 0 180);
--chart-5: oklch(1 0 180);
}