Generous is a shadcn/ui theme built around a near-white primary color (#fbfcf8) with near-white accents (#f9fcf8). The light mode uses a neutral background (#fdfdfc). Dark mode keeps the near-white primary (#fbfcf8) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfdfcwhite | #000000black |
| Foreground | #060802black | #fdfdfcwhite |
| Card | #fdfdfcwhite | #000000black |
| Card foreground | #060802black | #fdfdfcwhite |
| Popover | #fdfdfcwhite | #000000black |
| Popover foreground | #060802black | #fdfdfcwhite |
| Primary | #fbfcf8snow | #fbfcf8snow |
| Primary foreground | #34411bdarkslategray | #34411bdarkslategray |
| Secondary | #fcfbf8snow | #fcfbf8snow |
| Secondary foreground | #413a1bdarkolivegreen | #413a1bdarkolivegreen |
| Muted | #eeead8antiquewhite | #272311black |
| Muted foreground | #46453edarkslategray | #c1bfb9silver |
| Accent | #f9fcf8mintcream | #f9fcf8mintcream |
| Accent foreground | #21411bdarkgreen | #21411bdarkgreen |
| Destructive | #c25414chocolate | #e26218chocolate |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #fbfcf8snow | #fbfcf8snow |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.79:1 | AAA |
| Text on card | 19.79:1 | AAA |
| Primary button | 10.61:1 | AAA |
| Secondary button | 11.01:1 | AAA |
| Muted text | 7.97:1 | AAA |
| Accent | 11.04:1 | AAA |
| Destructive | 4.59:1 | AA |
| Text on background | 20.63:1 | AAA |
| Text on card | 20.63:1 | AAA |
| Primary button | 10.61:1 | AAA |
| Secondary button | 11.01:1 | AAA |
| Muted text | 8.54:1 | AAA |
| Accent | 11.04:1 | AAA |
| Destructive | 5.99:1 | AA |
Paste this into your globals.css to use Generous in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.002 121.531);
--foreground: oklch(0.128 0.018 121.168);
--muted: oklch(0.935 0.024 97.586);
--muted-foreground: oklch(0.389 0.011 97.621);
--popover: oklch(0.994 0.002 121.531);
--popover-foreground: oklch(0.128 0.018 121.168);
--card: oklch(0.994 0.002 121.531);
--card-foreground: oklch(0.128 0.018 121.168);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.989 0.006 121.585);
--primary-foreground: oklch(0.353 0.061 124.688);
--secondary: oklch(0.989 0.005 97.323);
--secondary-foreground: oklch(0.349 0.049 98.259);
--accent: oklch(0.987 0.007 140.521);
--accent-foreground: oklch(0.339 0.073 140.365);
--destructive: oklch(0.578 0.157 44.896);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.989 0.006 121.585);
--chart-1: oklch(0.989 0.006 121.585);
--chart-2: oklch(0.989 0.005 97.323);
--chart-3: oklch(0.987 0.007 140.521);
--chart-4: oklch(1.006 0.002 277.228);
--chart-5: oklch(0.989 0.006 121.592);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.993 0.001 121.506);
--muted: oklch(0.255 0.031 98.293);
--muted-foreground: oklch(0.805 0.009 97.412);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.993 0.001 121.506);
--card: oklch(0 0 0);
--card-foreground: oklch(0.993 0.001 121.506);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.989 0.006 121.585);
--primary-foreground: oklch(0.353 0.061 124.688);
--secondary: oklch(0.989 0.005 97.323);
--secondary-foreground: oklch(0.349 0.049 98.259);
--accent: oklch(0.987 0.007 140.521);
--accent-foreground: oklch(0.339 0.073 140.365);
--destructive: oklch(0.647 0.177 44.647);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.989 0.006 121.585);
--chart-1: oklch(0.989 0.006 121.585);
--chart-2: oklch(0.989 0.005 97.323);
--chart-3: oklch(0.987 0.007 140.521);
--chart-4: oklch(1.006 0.002 277.228);
--chart-5: oklch(0.989 0.006 121.592);
}