Grapefruit is a shadcn/ui theme built around a light violet primary color (#c1afdf) with muted light violet accents (#cfcad8). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the light violet primary (#c1afdf) on a neutral background (#020204).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfbfewhite | #020204black |
| Foreground | #080212black | #ffffffwhite |
| Card | #f9f6fdghostwhite | #050307black |
| Card foreground | #06020dblack | #ffffffwhite |
| Popover | #fcfbfewhite | #020204black |
| Popover foreground | #080212black | #ffffffwhite |
| Primary | #c1afdflightsteelblue | #c1afdflightsteelblue |
| Primary foreground | #291a42midnightblue | #291a42midnightblue |
| Secondary | #e0dfe2gainsboro | #221e29black |
| Secondary foreground | #46434cdarkslategray | #bab2c7silver |
| Muted | #d9d2e5gainsboro | #211a2dblack |
| Muted foreground | #454545darkslategray | #bababasilver |
| Accent | #cfcad8lightgrey | #352b45darkslategray |
| Accent foreground | #362f41darkslategray | #cfc7dcthistle |
| Destructive | #731c0dmaroon | #e74023orangered |
| Destructive foreground | #f7c3balightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #c1afdflightsteelblue | #c1afdflightsteelblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.78:1 | AAA |
| Text on card | 19.25:1 | AAA |
| Primary button | 7.91:1 | AAA |
| Secondary button | 7.27:1 | AAA |
| Muted text | 6.51:1 | AA |
| Accent | 7.98:1 | AAA |
| Destructive | 7.09:1 | AAA |
| Text on background | 20.76:1 | AAA |
| Text on card | 20.53:1 | AAA |
| Primary button | 7.91:1 | AAA |
| Secondary button | 7.98:1 | AAA |
| Muted text | 8.63:1 | AAA |
| Accent | 8.10:1 | AAA |
| Destructive | 4.08:1 | AA Large |
Paste this into your globals.css to use Grapefruit in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.989 0.005 303.567);
--foreground: oklch(0.119 0.041 302.84);
--muted: oklch(0.874 0.027 303.176);
--muted-foreground: oklch(0.39 0 165.964);
--popover: oklch(0.989 0.005 303.567);
--popover-foreground: oklch(0.119 0.041 302.84);
--card: oklch(0.978 0.01 303.493);
--card-foreground: oklch(0.108 0.036 304.512);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.785 0.07 302.306);
--primary-foreground: oklch(0.26 0.072 298.978);
--secondary: oklch(0.904 0.005 303.555);
--secondary-foreground: oklch(0.39 0.015 303.074);
--accent: oklch(0.847 0.021 303.272);
--accent-foreground: oklch(0.321 0.033 302.116);
--destructive: oklch(0.37 0.123 32.358);
--destructive-foreground: oklch(0.862 0.061 29.891);
--ring: oklch(0.785 0.07 302.306);
--chart-1: oklch(0.785 0.07 302.306);
--chart-2: oklch(0.904 0.005 303.555);
--chart-3: oklch(0.847 0.021 303.272);
--chart-4: oklch(0.929 0.004 303.578);
--chart-5: oklch(0.782 0.075 302.204);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.084 0.011 304.222);
--foreground: oklch(1 0 180);
--muted: oklch(0.236 0.038 301.209);
--muted-foreground: oklch(0.789 0 171.254);
--popover: oklch(0.084 0.011 304.222);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.106 0.014 304.222);
--card-foreground: oklch(1 0 180);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.785 0.07 302.306);
--primary-foreground: oklch(0.26 0.072 298.978);
--secondary: oklch(0.245 0.022 302.286);
--secondary-foreground: oklch(0.777 0.031 303.049);
--accent: oklch(0.313 0.047 301.351);
--accent-foreground: oklch(0.841 0.03 303.107);
--destructive: oklch(0.615 0.207 32.338);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.785 0.07 302.306);
--chart-1: oklch(0.785 0.07 302.306);
--chart-2: oklch(0.245 0.022 302.286);
--chart-3: oklch(0.313 0.047 301.351);
--chart-4: oklch(0.274 0.026 302.208);
--chart-5: oklch(0.782 0.075 302.204);
}