Afraid is a shadcn/ui theme built around a green primary color (#42bd79) with muted light green accents (#e5ebe8). The light mode uses a neutral background (#f8fcfa). Dark mode keeps the green primary (#42bd79) on a green-tinted background (#060f0a).
| Token | Light | Dark |
|---|---|---|
| Background | #f8fcfamintcream | #060f0ablack |
| Foreground | #04100ablack | #fcfdfcwhite |
| Card | #f8fcfamintcream | #060f0ablack |
| Card foreground | #04100ablack | #fcfdfcwhite |
| Popover | #f8fcfamintcream | #060f0ablack |
| Popover foreground | #04100ablack | #fcfdfcwhite |
| Primary | #42bd79mediumseagreen | #42bd79mediumseagreen |
| Primary foreground | #0d2618black | #0d2618black |
| Secondary | #e5ebe8lavender | #1d2521black |
| Secondary foreground | #46594edarkslategray | #b2c2b9silver |
| Muted | #dbf0e4gainsboro | #0f2418black |
| Muted foreground | #4f6358dimgray | #9cb0a5darkgray |
| Accent | #e5ebe8lavender | #1d2521black |
| Accent foreground | #46594edarkslategray | #b2c2b9silver |
| Destructive | #861104darkred | #f94834tomato |
| Destructive foreground | #fdc5bfpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #42bd79mediumseagreen | #42bd79mediumseagreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.74:1 | AAA |
| Text on card | 18.74:1 | AAA |
| Primary button | 6.70:1 | AA |
| Secondary button | 6.20:1 | AA |
| Muted text | 5.39:1 | AA |
| Accent | 6.20:1 | AA |
| Destructive | 6.66:1 | AA |
| Text on background | 19.09:1 | AAA |
| Text on card | 19.09:1 | AAA |
| Primary button | 6.70:1 | AA |
| Secondary button | 8.43:1 | AAA |
| Muted text | 7.14:1 | AAA |
| Accent | 8.43:1 | AAA |
| Destructive | 3.50:1 | AA Large |
Paste this into your globals.css to use Afraid in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.988 0.006 162.465);
--foreground: oklch(0.159 0.024 160.67);
--muted: oklch(0.936 0.026 161.91);
--muted-foreground: oklch(0.48 0.029 161.007);
--popover: oklch(0.988 0.006 162.465);
--popover-foreground: oklch(0.159 0.024 160.67);
--card: oklch(0.988 0.006 162.465);
--card-foreground: oklch(0.159 0.024 160.67);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.713 0.147 155.403);
--primary-foreground: oklch(0.243 0.04 157.387);
--secondary: oklch(0.934 0.007 162.429);
--secondary-foreground: oklch(0.443 0.029 160.89);
--accent: oklch(0.934 0.007 162.429);
--accent-foreground: oklch(0.443 0.029 160.89);
--destructive: oklch(0.397 0.151 30.702);
--destructive-foreground: oklch(0.871 0.065 25.774);
--ring: oklch(0.713 0.147 155.403);
--chart-1: oklch(0.713 0.147 155.403);
--chart-2: oklch(0.934 0.007 162.429);
--chart-3: oklch(0.934 0.007 162.429);
--chart-4: oklch(0.956 0.005 162.496);
--chart-5: oklch(0.721 0.154 154.981);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.156 0.018 161.078);
--foreground: oklch(0.993 0.002 162.579);
--muted: oklch(0.238 0.034 158.246);
--muted-foreground: oklch(0.737 0.027 161.694);
--popover: oklch(0.156 0.018 161.078);
--popover-foreground: oklch(0.993 0.002 162.579);
--card: oklch(0.156 0.018 161.078);
--card-foreground: oklch(0.993 0.002 162.579);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.713 0.147 155.403);
--primary-foreground: oklch(0.243 0.04 157.387);
--secondary: oklch(0.256 0.014 161.189);
--secondary-foreground: oklch(0.8 0.022 161.92);
--accent: oklch(0.256 0.014 161.189);
--accent-foreground: oklch(0.8 0.022 161.92);
--destructive: oklch(0.655 0.216 30.147);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.713 0.147 155.403);
--chart-1: oklch(0.713 0.147 155.403);
--chart-2: oklch(0.256 0.014 161.189);
--chart-3: oklch(0.256 0.014 161.189);
--chart-4: oklch(0.289 0.017 161.105);
--chart-5: oklch(0.721 0.154 154.981);
}