Affectionate is a shadcn/ui theme built around a vivid green primary color (#2af83f) with vivid teal accents (#2af8a6). The light mode uses a neutral background (#fbfefb). Dark mode keeps the vivid green primary (#2af83f) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfefbwhite | #000000black |
| Foreground | #010402black | #f8fcf8mintcream |
| Card | #f7fdf7mintcream | #030303black |
| Card foreground | #000000black | #fcfdfcwhite |
| Popover | #fbfefbwhite | #000000black |
| Popover foreground | #010402black | #f8fcf8mintcream |
| Primary | #2af83flimegreen | #2af83flimegreen |
| Primary foreground | #03540bdarkgreen | #03540bdarkgreen |
| Secondary | #7df82alawngreen | #7df82alawngreen |
| Secondary foreground | #235403darkgreen | #235403darkgreen |
| Muted | #e2e9ddgainsboro | #1b2216black |
| Muted foreground | #60665cdimgray | #9da399darkgray |
| Accent | #2af8a6mediumspringgreen | #2af8a6mediumspringgreen |
| Accent foreground | #035433darkslategray | #035433darkslategray |
| Destructive | #d80e0ered | #f12727crimson |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #2af83flimegreen | #2af83flimegreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.28:1 | AAA |
| Text on card | 20.36:1 | AAA |
| Primary button | 6.43:1 | AA |
| Secondary button | 6.57:1 | AA |
| Muted text | 4.76:1 | AA |
| Accent | 6.52:1 | AA |
| Destructive | 5.27:1 | AA |
| Text on background | 20.27:1 | AAA |
| Text on card | 20.28:1 | AAA |
| Primary button | 6.43:1 | AA |
| Secondary button | 6.57:1 | AA |
| Muted text | 6.30:1 | AA |
| Accent | 6.52:1 | AA |
| Destructive | 4.14:1 | AA Large |
Paste this into your globals.css to use Affectionate in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.005 148.534);
--foreground: oklch(0.096 0.016 147.469);
--muted: oklch(0.925 0.018 132.507);
--muted-foreground: oklch(0.501 0.017 132.612);
--popover: oklch(0.994 0.005 148.534);
--popover-foreground: oklch(0.096 0.016 147.469);
--card: oklch(0.988 0.01 148.475);
--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.854 0.268 143.695);
--primary-foreground: oklch(0.388 0.125 143.588);
--secondary: oklch(0.874 0.251 136.646);
--secondary-foreground: oklch(0.396 0.118 136.959);
--accent: oklch(0.868 0.19 159.493);
--accent-foreground: oklch(0.394 0.09 158.701);
--destructive: oklch(0.557 0.223 28.735);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.854 0.268 143.695);
--chart-1: oklch(0.854 0.268 143.695);
--chart-2: oklch(0.874 0.251 136.646);
--chart-3: oklch(0.868 0.19 159.493);
--chart-4: oklch(0.88 0.241 136.097);
--chart-5: oklch(0.862 0.273 143.604);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.987 0.006 148.527);
--muted: oklch(0.241 0.025 133.211);
--muted-foreground: oklch(0.708 0.015 132.522);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.987 0.006 148.527);
--card: oklch(0.092 0 180);
--card-foreground: oklch(0.993 0.003 148.56);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.854 0.268 143.695);
--primary-foreground: oklch(0.388 0.125 143.588);
--secondary: oklch(0.874 0.251 136.646);
--secondary-foreground: oklch(0.396 0.118 136.959);
--accent: oklch(0.868 0.19 159.493);
--accent-foreground: oklch(0.394 0.09 158.701);
--destructive: oklch(0.616 0.233 27.558);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.854 0.268 143.695);
--chart-1: oklch(0.854 0.268 143.695);
--chart-2: oklch(0.874 0.251 136.646);
--chart-3: oklch(0.868 0.19 159.493);
--chart-4: oklch(0.88 0.241 136.097);
--chart-5: oklch(0.862 0.273 143.604);
}