Afraid is a shadcn/ui theme built around a near-black primary color (#000205) with near-black accents (#020500). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#000205) on a blue-tinted background (#05070a).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #05070ablack |
| Foreground | #000000black | #f5f7f9whitesmoke |
| Card | #ffffffwhite | #05070ablack |
| Card foreground | #000000black | #f5f7f9whitesmoke |
| Popover | #ffffffwhite | #05070ablack |
| Popover foreground | #000000black | #f5f7f9whitesmoke |
| Primary | #000205black | #000205black |
| Primary foreground | #9fc0felightskyblue | #9fc0felightskyblue |
| Secondary | #050002black | #050002black |
| Secondary foreground | #fd3a7edeeppink | #fd3a7edeeppink |
| Muted | #f1e9eclinen | #160e11black |
| Muted foreground | #4b3f43darkslategray | #c0b4b8silver |
| Accent | #020500black | #020500black |
| Accent foreground | #4acf02limegreen | #4acf02limegreen |
| Destructive | #620e09maroon | #e52015crimson |
| Destructive foreground | #f7aaa6lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #000205black | #000205black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 11.33:1 | AAA |
| Secondary button | 6.03:1 | AA |
| Muted text | 8.43:1 | AAA |
| Accent | 9.97:1 | AAA |
| Destructive | 7.10:1 | AAA |
| Text on background | 18.78:1 | AAA |
| Text on card | 18.78:1 | AAA |
| Primary button | 11.33:1 | AAA |
| Secondary button | 6.03:1 | AA |
| Muted text | 9.47:1 | AAA |
| Accent | 9.97:1 | AAA |
| Destructive | 4.63:1 | AA |
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 0 0);
--muted: oklch(0.942 0.009 353.842);
--muted-foreground: oklch(0.381 0.018 354.929);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0 0 0);
--card: oklch(1 0 180);
--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.079 0.02 246.79);
--primary-foreground: oklch(0.807 0.095 262.492);
--secondary: oklch(0.076 0.031 352.766);
--secondary-foreground: oklch(0.664 0.231 5.698);
--accent: oklch(0.104 0.028 131.619);
--accent-foreground: oklch(0.751 0.238 139.25);
--destructive: oklch(0.322 0.118 28.841);
--destructive-foreground: oklch(0.811 0.091 22.605);
--ring: oklch(0.079 0.02 246.79);
--chart-1: oklch(0.079 0.02 246.79);
--chart-2: oklch(0.076 0.031 352.766);
--chart-3: oklch(0.104 0.028 131.619);
--chart-4: oklch(0.126 0.05 355.879);
--chart-5: oklch(0.079 0.021 246.096);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.127 0.009 258.466);
--foreground: oklch(0.975 0.004 263.047);
--muted: oklch(0.175 0.014 355.721);
--muted-foreground: oklch(0.781 0.015 354.131);
--popover: oklch(0.127 0.009 258.466);
--popover-foreground: oklch(0.975 0.004 263.047);
--card: oklch(0.127 0.009 258.466);
--card-foreground: oklch(0.975 0.004 263.047);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.079 0.02 246.79);
--primary-foreground: oklch(0.807 0.095 262.492);
--secondary: oklch(0.076 0.031 352.766);
--secondary-foreground: oklch(0.664 0.231 5.698);
--accent: oklch(0.104 0.028 131.619);
--accent-foreground: oklch(0.751 0.238 139.25);
--destructive: oklch(0.588 0.227 29.329);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.079 0.02 246.79);
--chart-1: oklch(0.079 0.02 246.79);
--chart-2: oklch(0.076 0.031 352.766);
--chart-3: oklch(0.104 0.028 131.619);
--chart-4: oklch(0.126 0.05 355.879);
--chart-5: oklch(0.079 0.021 246.096);
}