Shocked is a shadcn/ui theme built around a green primary color (#587d1c) with green accents (#277d1c). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#587d1c) on a neutral background (#060703).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #060703black |
| Foreground | #060802black | #f8f9f6whitesmoke |
| Card | #fcfcfcsnow | #080a05black |
| Card foreground | #030401black | #fafbf9snow |
| Popover | #ffffffwhite | #060703black |
| Popover foreground | #060802black | #f8f9f6whitesmoke |
| Primary | #587d1cdarkolivegreen | #587d1cdarkolivegreen |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #7d721colive | #7d721colive |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #f5f4f0whitesmoke | #0f0f0ablack |
| Muted foreground | #656561dimgray | #9e9d9adarkgray |
| Accent | #277d1cforestgreen | #277d1cforestgreen |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #7f1c0bmaroon | #ed4d31tomato |
| Destructive foreground | #facac2pink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #587d1cdarkolivegreen | #587d1cdarkolivegreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.12:1 | AAA |
| Text on card | 20.11:1 | AAA |
| Primary button | 4.78:1 | AA |
| Secondary button | 4.87:1 | AA |
| Muted text | 5.31:1 | AA |
| Accent | 5.17:1 | AA |
| Destructive | 6.89:1 | AA |
| Text on background | 19.13:1 | AAA |
| Text on card | 19.12:1 | AAA |
| Primary button | 4.78:1 | AA |
| Secondary button | 4.87:1 | AA |
| Muted text | 7.09:1 | AAA |
| Accent | 5.17:1 | AA |
| Destructive | 3.68:1 | AA Large |
Paste this into your globals.css to use Shocked in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.128 0.019 123.037);
--muted: oklch(0.967 0.006 100.421);
--muted-foreground: oklch(0.506 0.005 100.496);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.128 0.019 123.037);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.101 0.015 123.037);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.544 0.13 128.78);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.547 0.104 101.467);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.52 0.155 141.486);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.393 0.136 32.266);
--destructive-foreground: oklch(0.879 0.055 29.824);
--ring: oklch(0.544 0.13 128.78);
--chart-1: oklch(0.544 0.13 128.78);
--chart-2: oklch(0.547 0.104 101.467);
--chart-3: oklch(0.52 0.155 141.486);
--chart-4: oklch(0.585 0.111 101.439);
--chart-5: oklch(0.55 0.134 129.012);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.124 0.012 123.223);
--foreground: oklch(0.98 0.004 123.694);
--muted: oklch(0.166 0.009 101.072);
--muted-foreground: oklch(0.696 0.005 100.442);
--popover: oklch(0.124 0.012 123.223);
--popover-foreground: oklch(0.98 0.004 123.694);
--card: oklch(0.142 0.014 123.231);
--card-foreground: oklch(0.986 0.002 123.675);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.544 0.13 128.78);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.547 0.104 101.467);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.52 0.155 141.486);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.64 0.201 32.376);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.544 0.13 128.78);
--chart-1: oklch(0.544 0.13 128.78);
--chart-2: oklch(0.547 0.104 101.467);
--chart-3: oklch(0.52 0.155 141.486);
--chart-4: oklch(0.585 0.111 101.439);
--chart-5: oklch(0.55 0.134 129.012);
}