Afraid is a shadcn/ui theme built around a muted deep purple primary color (#1a0f19) with muted deep pink accents (#1a0f13). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep purple primary (#1a0f19) on a neutral background (#040104).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #040104black |
| Foreground | #120311black | #fbf9fbsnow |
| Card | #ffffffwhite | #040104black |
| Card foreground | #120311black | #fbf9fbsnow |
| Popover | #ffffffwhite | #040104black |
| Popover foreground | #120311black | #fbf9fbsnow |
| Primary | #1a0f19black | #1a0f19black |
| Primary foreground | #c397c0darkgray | #c397c0darkgray |
| Secondary | #150f1ablack | #150f1ablack |
| Secondary foreground | #b197c3darkgray | #b197c3darkgray |
| Muted | #dfdae2gainsboro | #221d25black |
| Muted foreground | #605568dimgray | #a297aadarkgray |
| Accent | #1a0f13black | #1a0f13black |
| Accent foreground | #c397aarosybrown | #c397aarosybrown |
| Destructive | #9b2608firebrick | #f3461borangered |
| Destructive foreground | #fde0d8mistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #1a0f19black | #1a0f19black |
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 | 7.55:1 | AAA |
| Secondary button | 7.24:1 | AAA |
| Muted text | 5.08:1 | AA |
| Accent | 7.42:1 | AAA |
| Destructive | 6.30:1 | AA |
| Text on background | 19.81:1 | AAA |
| Text on card | 19.81:1 | AAA |
| Primary button | 7.55:1 | AAA |
| Secondary button | 7.24:1 | AAA |
| Muted text | 5.93:1 | AA |
| Accent | 7.42:1 | AAA |
| Destructive | 3.67:1 | AA Large |
Paste this into your globals.css to use Afraid in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.136 0.044 330.541);
--muted: oklch(0.894 0.012 311.617);
--muted-foreground: oklch(0.467 0.033 311.157);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.136 0.044 330.541);
--card: oklch(1 0 180);
--card-foreground: oklch(0.136 0.044 330.541);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.188 0.026 329.441);
--primary-foreground: oklch(0.732 0.076 329.092);
--secondary: oklch(0.182 0.024 310.641);
--secondary-foreground: oklch(0.715 0.069 310.948);
--accent: oklch(0.185 0.02 352.586);
--accent-foreground: oklch(0.724 0.058 351.803);
--destructive: oklch(0.455 0.158 33.885);
--destructive-foreground: oklch(0.928 0.034 34.309);
--ring: oklch(0.188 0.026 329.441);
--chart-1: oklch(0.188 0.026 329.441);
--chart-2: oklch(0.182 0.024 310.641);
--chart-3: oklch(0.185 0.02 352.586);
--chart-4: oklch(0.212 0.032 310.49);
--chart-5: oklch(0.187 0.029 329.584);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.086 0.018 329.308);
--foreground: oklch(0.984 0.003 328.094);
--muted: oklch(0.24 0.016 311.176);
--muted-foreground: oklch(0.693 0.03 311.377);
--popover: oklch(0.086 0.018 329.308);
--popover-foreground: oklch(0.984 0.003 328.094);
--card: oklch(0.086 0.018 329.308);
--card-foreground: oklch(0.984 0.003 328.094);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.188 0.026 329.441);
--primary-foreground: oklch(0.732 0.076 329.092);
--secondary: oklch(0.182 0.024 310.641);
--secondary-foreground: oklch(0.715 0.069 310.948);
--accent: oklch(0.185 0.02 352.586);
--accent-foreground: oklch(0.724 0.058 351.803);
--destructive: oklch(0.642 0.215 34.261);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.188 0.026 329.441);
--chart-1: oklch(0.188 0.026 329.441);
--chart-2: oklch(0.182 0.024 310.641);
--chart-3: oklch(0.185 0.02 352.586);
--chart-4: oklch(0.212 0.032 310.49);
--chart-5: oklch(0.187 0.029 329.584);
}