Violet is a shadcn/ui theme built around a deep orange primary color (#171008) with deep yellow accents (#161708). The light mode uses a neutral background (#fdfaf7). Dark mode keeps the deep orange primary (#171008) on a neutral background (#070503).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfaf7snow | #070503black |
| Foreground | #0d0802black | #ffffffwhite |
| Card | #fcf8f3floralwhite | #0a0805black |
| Card foreground | #090502black | #ffffffwhite |
| Popover | #fdfaf7snow | #070503black |
| Popover foreground | #0d0802black | #ffffffwhite |
| Primary | #171008black | #171008black |
| Primary foreground | #d4ad7dtan | #d4ad7dtan |
| Secondary | #170808black | #170808black |
| Secondary foreground | #d4817dlightcoral | #d4817dlightcoral |
| Muted | #e9cfcelightgrey | #311716black |
| Muted foreground | #483837darkslategray | #c8b8b7silver |
| Accent | #161708black | #161708black |
| Accent foreground | #aab03byellowgreen | #aab03byellowgreen |
| Destructive | #aa2a0efirebrick | #d93612orangered |
| Destructive foreground | #fdefecseashell | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #171008black | #171008black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.19:1 | AAA |
| Text on card | 19.17:1 | AAA |
| Primary button | 9.04:1 | AAA |
| Secondary button | 6.72:1 | AA |
| Muted text | 7.53:1 | AAA |
| Accent | 7.74:1 | AAA |
| Destructive | 6.14:1 | AA |
| Text on background | 20.32:1 | AAA |
| Text on card | 19.99:1 | AAA |
| Primary button | 9.04:1 | AAA |
| Secondary button | 6.72:1 | AA |
| Muted text | 8.65:1 | AAA |
| Accent | 7.74:1 | AAA |
| Destructive | 4.67:1 | AA |
Paste this into your globals.css to use Violet in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.987 0.005 73.181);
--foreground: oklch(0.139 0.019 81.284);
--muted: oklch(0.876 0.029 21.331);
--muted-foreground: oklch(0.359 0.023 21.775);
--popover: oklch(0.987 0.005 73.181);
--popover-foreground: oklch(0.139 0.019 81.284);
--card: oklch(0.98 0.008 73.16);
--card-foreground: oklch(0.121 0.017 82.365);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.179 0.02 72.202);
--primary-foreground: oklch(0.77 0.078 71.858);
--secondary: oklch(0.159 0.026 24.074);
--secondary-foreground: oklch(0.69 0.103 23.311);
--accent: oklch(0.199 0.028 111.16);
--accent-foreground: oklch(0.73 0.138 112.128);
--destructive: oklch(0.487 0.168 33.42);
--destructive-foreground: oklch(0.963 0.016 32.669);
--ring: oklch(0.179 0.02 72.202);
--chart-1: oklch(0.179 0.02 72.202);
--chart-2: oklch(0.159 0.026 24.074);
--chart-3: oklch(0.199 0.028 111.16);
--chart-4: oklch(0.191 0.038 24.333);
--chart-5: oklch(0.18 0.021 72.255);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.119 0.009 78.196);
--foreground: oklch(1 0 180);
--muted: oklch(0.243 0.042 23.793);
--muted-foreground: oklch(0.795 0.018 21.186);
--popover: oklch(0.119 0.009 78.196);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.136 0.01 78.163);
--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.179 0.02 72.202);
--primary-foreground: oklch(0.77 0.078 71.858);
--secondary: oklch(0.159 0.026 24.074);
--secondary-foreground: oklch(0.69 0.103 23.311);
--accent: oklch(0.199 0.028 111.16);
--accent-foreground: oklch(0.73 0.138 112.128);
--destructive: oklch(0.582 0.204 33.257);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.179 0.02 72.202);
--chart-1: oklch(0.179 0.02 72.202);
--chart-2: oklch(0.159 0.026 24.074);
--chart-3: oklch(0.199 0.028 111.16);
--chart-4: oklch(0.191 0.038 24.333);
--chart-5: oklch(0.18 0.021 72.255);
}