Violation is a shadcn/ui theme built around a blue primary color (#7eaad3) with indigo accents (#7e7fd3). The light mode uses a neutral background (#ffffff). Dark mode keeps the blue primary (#7eaad3) on a neutral background (#010304).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #010304black |
| Foreground | #030a11black | #f9fafbghostwhite |
| Card | #fcfcfcsnow | #030507black |
| Card foreground | #02080dblack | #fcfcfdwhite |
| Popover | #ffffffwhite | #010304black |
| Popover foreground | #030a11black | #f9fafbghostwhite |
| Primary | #7eaad3cornflowerblue | #7eaad3cornflowerblue |
| Primary foreground | #081017black | #081017black |
| Secondary | #7ed3d1skyblue | #7ed3d1skyblue |
| Secondary foreground | #081717black | #081717black |
| Muted | #e9ececlavender | #131616black |
| Muted foreground | #4c5757darkslategray | #a8b3b3darkgray |
| Accent | #7e7fd3mediumpurple | #7e7fd3mediumpurple |
| Accent foreground | #000000black | #000000black |
| Destructive | #652b0bsaddlebrown | #e76a27chocolate |
| Destructive foreground | #f6c6acwheat | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #7eaad3cornflowerblue | #7eaad3cornflowerblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.89:1 | AAA |
| Text on card | 19.69:1 | AAA |
| Primary button | 7.79:1 | AAA |
| Secondary button | 10.56:1 | AAA |
| Muted text | 6.30:1 | AA |
| Accent | 5.87:1 | AA |
| Destructive | 7.15:1 | AAA |
| Text on background | 19.80:1 | AAA |
| Text on card | 19.89:1 | AAA |
| Primary button | 7.79:1 | AAA |
| Secondary button | 10.56:1 | AAA |
| Muted text | 8.46:1 | AAA |
| Accent | 5.87:1 | AA |
| Destructive | 6.50:1 | AA |
Paste this into your globals.css to use Violation in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.142 0.02 241.3);
--muted: oklch(0.941 0.004 195.909);
--muted-foreground: oklch(0.448 0.014 195.423);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.142 0.02 241.3);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.128 0.017 237.567);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.721 0.077 247.252);
--primary-foreground: oklch(0.167 0.02 246.903);
--secondary: oklch(0.812 0.083 194.27);
--secondary-foreground: oklch(0.19 0.021 194.156);
--accent: oklch(0.632 0.124 281.497);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.365 0.094 44.975);
--destructive-foreground: oklch(0.862 0.065 49.776);
--ring: oklch(0.721 0.077 247.252);
--chart-1: oklch(0.721 0.077 247.252);
--chart-2: oklch(0.812 0.083 194.27);
--chart-3: oklch(0.632 0.124 281.497);
--chart-4: oklch(0.828 0.077 194.425);
--chart-5: oklch(0.721 0.081 247.345);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.09 0.007 240.094);
--foreground: oklch(0.984 0.002 245.99);
--muted: oklch(0.197 0.005 195.529);
--muted-foreground: oklch(0.758 0.013 195.682);
--popover: oklch(0.09 0.007 240.094);
--popover-foreground: oklch(0.984 0.002 245.99);
--card: oklch(0.113 0.009 240.094);
--card-foreground: oklch(0.992 0.001 245.978);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.721 0.077 247.252);
--primary-foreground: oklch(0.167 0.02 246.903);
--secondary: oklch(0.812 0.083 194.27);
--secondary-foreground: oklch(0.19 0.021 194.156);
--accent: oklch(0.632 0.124 281.497);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.667 0.172 44.927);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.721 0.077 247.252);
--chart-1: oklch(0.721 0.077 247.252);
--chart-2: oklch(0.812 0.083 194.27);
--chart-3: oklch(0.632 0.124 281.497);
--chart-4: oklch(0.828 0.077 194.425);
--chart-5: oklch(0.721 0.081 247.345);
}