Afraid is a shadcn/ui theme built around a green primary color (#2d7920) with purple accents (#6c2079). The light mode uses a neutral background (#fbfefb). Dark mode keeps the green primary (#2d7920) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfefbwhite | #000000black |
| Foreground | #000000black | #ffffffwhite |
| Card | #fbfefbwhite | #000000black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #fbfefbwhite | #000000black |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #2d7920forestgreen | #2d7920forestgreen |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #6c2079rebeccapurple | #6c2079rebeccapurple |
| Secondary foreground | #f0d7f4lavender | #f0d7f4lavender |
| Muted | #dad7dbgainsboro | #282428darkslategray |
| Muted foreground | #5e5e5edimgray | #a1a1a1darkgray |
| Accent | #6c2079rebeccapurple | #6c2079rebeccapurple |
| Accent foreground | #f0d7f4lavender | #f0d7f4lavender |
| Destructive | #981b10firebrick | #e22918crimson |
| Destructive foreground | #fce1dfmistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #2d7920forestgreen | #2d7920forestgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.69:1 | AAA |
| Text on card | 20.69:1 | AAA |
| Primary button | 5.43:1 | AA |
| Secondary button | 7.43:1 | AAA |
| Muted text | 4.54:1 | AA |
| Accent | 7.43:1 | AAA |
| Destructive | 6.76:1 | AA |
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 5.43:1 | AA |
| Secondary button | 7.43:1 | AAA |
| Muted text | 5.90:1 | AA |
| Accent | 7.43:1 | AAA |
| Destructive | 4.60:1 | AA |
Paste this into your globals.css to use Afraid in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.005 141.054);
--foreground: oklch(0 0 0);
--muted: oklch(0.882 0.006 321.081);
--muted-foreground: oklch(0.483 0 180);
--popover: oklch(0.994 0.005 141.054);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.994 0.005 141.054);
--card-foreground: oklch(0 0 0);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.51 0.144 140.906);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.402 0.154 321.234);
--secondary-foreground: oklch(0.908 0.048 321.178);
--accent: oklch(0.402 0.154 321.234);
--accent-foreground: oklch(0.908 0.048 321.178);
--destructive: oklch(0.442 0.162 29.979);
--destructive-foreground: oklch(0.931 0.029 23.916);
--ring: oklch(0.51 0.144 140.906);
--chart-1: oklch(0.51 0.144 140.906);
--chart-2: oklch(0.402 0.154 321.234);
--chart-3: oklch(0.402 0.154 321.234);
--chart-4: oklch(0.43 0.166 321.218);
--chart-5: oklch(0.515 0.149 140.953);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(1 0 180);
--muted: oklch(0.267 0.008 321.133);
--muted-foreground: oklch(0.708 0 158.199);
--popover: oklch(0 0 0);
--popover-foreground: oklch(1 0 180);
--card: oklch(0 0 0);
--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.51 0.144 140.906);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.402 0.154 321.234);
--secondary-foreground: oklch(0.908 0.048 321.178);
--accent: oklch(0.402 0.154 321.234);
--accent-foreground: oklch(0.908 0.048 321.178);
--destructive: oklch(0.589 0.22 30.058);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.51 0.144 140.906);
--chart-1: oklch(0.51 0.144 140.906);
--chart-2: oklch(0.402 0.154 321.234);
--chart-3: oklch(0.402 0.154 321.234);
--chart-4: oklch(0.43 0.166 321.218);
--chart-5: oklch(0.515 0.149 140.953);
}