Violet is a shadcn/ui theme built around a vivid deep yellow primary color (#514e0b) with vivid deep indigo accents (#0b0e51). The light mode uses a neutral background (#fdfdf7). Dark mode keeps the vivid deep yellow primary (#514e0b) on a neutral background (#040302).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfdf7snow | #040302black |
| Foreground | #040401black | #ffffffwhite |
| Card | #fdfdf7snow | #040302black |
| Card foreground | #040401black | #ffffffwhite |
| Popover | #fdfdf7snow | #040302black |
| Popover foreground | #040401black | #ffffffwhite |
| Primary | #514e0bdarkolivegreen | #514e0bdarkolivegreen |
| Primary foreground | #e6de41goldenrod | #e6de41goldenrod |
| Secondary | #0b0e51midnightblue | #0b0e51midnightblue |
| Secondary foreground | #9ca0f2lightsteelblue | #9ca0f2lightsteelblue |
| Muted | #e9e9eclavender | #131316black |
| Muted foreground | #3b3b45darkslategray | #babbc4silver |
| Accent | #0b0e51midnightblue | #0b0e51midnightblue |
| Accent foreground | #9ca0f2lightsteelblue | #9ca0f2lightsteelblue |
| Destructive | #6f0d0cmaroon | #eb403dtomato |
| Destructive foreground | #f7b6b5lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #514e0bdarkolivegreen | #514e0bdarkolivegreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.06:1 | AAA |
| Text on card | 20.06:1 | AAA |
| Primary button | 6.10:1 | AA |
| Secondary button | 7.29:1 | AAA |
| Muted text | 9.15:1 | AAA |
| Accent | 7.29:1 | AAA |
| Destructive | 7.08:1 | AAA |
| Text on background | 20.58:1 | AAA |
| Text on card | 20.58:1 | AAA |
| Primary button | 6.10:1 | AA |
| Secondary button | 7.29:1 | AAA |
| Muted text | 9.70:1 | AAA |
| Accent | 7.29:1 | AAA |
| Destructive | 3.94:1 | AA Large |
Paste this into your globals.css to use Violet in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.992 0.008 104.103);
--foreground: oklch(0.104 0.014 106.715);
--muted: oklch(0.936 0.004 283.904);
--muted-foreground: oklch(0.356 0.017 283.126);
--popover: oklch(0.992 0.008 104.103);
--popover-foreground: oklch(0.104 0.014 106.715);
--card: oklch(0.992 0.008 104.103);
--card-foreground: oklch(0.104 0.014 106.715);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.413 0.083 106.299);
--primary-foreground: oklch(0.881 0.168 106.336);
--secondary: oklch(0.225 0.118 269.978);
--secondary-foreground: oklch(0.735 0.118 280.753);
--accent: oklch(0.225 0.118 269.978);
--accent-foreground: oklch(0.735 0.118 280.753);
--destructive: oklch(0.348 0.131 27.986);
--destructive-foreground: oklch(0.837 0.076 19.906);
--ring: oklch(0.413 0.083 106.299);
--chart-1: oklch(0.413 0.083 106.299);
--chart-2: oklch(0.225 0.118 269.978);
--chart-3: oklch(0.225 0.118 269.978);
--chart-4: oklch(0.247 0.133 269.383);
--chart-5: oklch(0.418 0.085 106.278);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.1 0.01 105.969);
--foreground: oklch(1 0 180);
--muted: oklch(0.188 0.005 283.457);
--muted-foreground: oklch(0.794 0.014 283.671);
--popover: oklch(0.1 0.01 105.969);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.1 0.01 105.969);
--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.413 0.083 106.299);
--primary-foreground: oklch(0.881 0.168 106.336);
--secondary: oklch(0.225 0.118 269.978);
--secondary-foreground: oklch(0.735 0.118 280.753);
--accent: oklch(0.225 0.118 269.978);
--accent-foreground: oklch(0.735 0.118 280.753);
--destructive: oklch(0.625 0.208 26.348);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.413 0.083 106.299);
--chart-1: oklch(0.413 0.083 106.299);
--chart-2: oklch(0.225 0.118 269.978);
--chart-3: oklch(0.225 0.118 269.978);
--chart-4: oklch(0.247 0.133 269.383);
--chart-5: oklch(0.418 0.085 106.278);
}