Shocking is a shadcn/ui theme built around a light violet primary color (#d6bceb) with muted light violet accents (#e1dce5). The light mode uses a neutral background (#ffffff). Dark mode keeps the light violet primary (#d6bceb) on a neutral background (#050407).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #050407black |
| Foreground | #0e0415black | #ffffffwhite |
| Card | #ffffffwhite | #050407black |
| Card foreground | #0e0415black | #ffffffwhite |
| Popover | #ffffffwhite | #050407black |
| Popover foreground | #0e0415black | #ffffffwhite |
| Primary | #d6bcebthistle | #d6bcebthistle |
| Primary foreground | #3e1a5bmidnightblue | #3e1a5bmidnightblue |
| Secondary | #e1dce5gainsboro | #29242edarkslategray |
| Secondary foreground | #483d52darkslategray | #c3bac9silver |
| Muted | #dacce6gainsboro | #281933darkslategray |
| Muted foreground | #5c5c5cdimgray | #a3a3a3darkgray |
| Accent | #e1dce5gainsboro | #29242edarkslategray |
| Accent foreground | #483d52darkslategray | #c3bac9silver |
| Destructive | #a01f08firebrick | #f33c1borangered |
| Destructive foreground | #fde2ddmistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #d6bcebthistle | #d6bcebthistle |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.05:1 | AAA |
| Text on card | 20.05:1 | AAA |
| Primary button | 8.14:1 | AAA |
| Secondary button | 7.52:1 | AAA |
| Muted text | 4.37:1 | AA Large |
| Accent | 7.52:1 | AAA |
| Destructive | 6.34:1 | AA |
| Text on background | 20.48:1 | AAA |
| Text on card | 20.48:1 | AAA |
| Primary button | 8.14:1 | AAA |
| Secondary button | 8.07:1 | AAA |
| Muted text | 6.51:1 | AA |
| Accent | 8.07:1 | AAA |
| Destructive | 3.84:1 | AA Large |
Paste this into your globals.css to use Shocking in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.138 0.042 309.033);
--muted: oklch(0.864 0.039 310.023);
--muted-foreground: oklch(0.474 0 198.435);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.138 0.042 309.033);
--card: oklch(1 0 180);
--card-foreground: oklch(0.138 0.042 309.033);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.832 0.071 309.642);
--primary-foreground: oklch(0.307 0.112 306.091);
--secondary: oklch(0.901 0.013 310.298);
--secondary-foreground: oklch(0.38 0.039 309.484);
--accent: oklch(0.901 0.013 310.298);
--accent-foreground: oklch(0.38 0.039 309.484);
--destructive: oklch(0.459 0.167 31.967);
--destructive-foreground: oklch(0.933 0.031 29.617);
--ring: oklch(0.832 0.071 309.642);
--chart-1: oklch(0.832 0.071 309.642);
--chart-2: oklch(0.901 0.013 310.298);
--chart-3: oklch(0.901 0.013 310.298);
--chart-4: oklch(0.926 0.01 310.337);
--chart-5: oklch(0.83 0.075 309.596);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.109 0.012 311.324);
--foreground: oklch(1 0 180);
--muted: oklch(0.246 0.051 308.382);
--muted-foreground: oklch(0.716 0 165.964);
--popover: oklch(0.109 0.012 311.324);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.109 0.012 311.324);
--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.832 0.071 309.642);
--primary-foreground: oklch(0.307 0.112 306.091);
--secondary: oklch(0.27 0.019 309.771);
--secondary-foreground: oklch(0.801 0.022 310.18);
--accent: oklch(0.27 0.019 309.771);
--accent-foreground: oklch(0.801 0.022 310.18);
--destructive: oklch(0.633 0.223 32.18);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.832 0.071 309.642);
--chart-1: oklch(0.832 0.071 309.642);
--chart-2: oklch(0.27 0.019 309.771);
--chart-3: oklch(0.27 0.019 309.771);
--chart-4: oklch(0.299 0.022 309.742);
--chart-5: oklch(0.83 0.075 309.596);
}