Coconut is a shadcn/ui theme built around a vivid green primary color (#96f377) with vivid purple accents (#d477f3). The light mode uses a neutral background (#f9fcf8). Dark mode keeps the vivid green primary (#96f377) on a green-tinted background (#080e06).
| Token | Light | Dark |
|---|---|---|
| Background | #f9fcf8mintcream | #080e06black |
| Foreground | #030802black | #fcfdfcwhite |
| Card | #f6faf5whitesmoke | #0a1208black |
| Card foreground | #020401black | #ffffffwhite |
| Popover | #f6faf5whitesmoke | #0a1208black |
| Popover foreground | #020401black | #ffffffwhite |
| Primary | #96f377lightgreen | #96f377lightgreen |
| Primary foreground | #103404darkgreen | #103404darkgreen |
| Secondary | #d477f3violet | #d477f3violet |
| Secondary foreground | #280434midnightblue | #280434midnightblue |
| Muted | #f0e8f3lavender | #150c17black |
| Muted foreground | #524a55darkslategray | #b3aab5darkgray |
| Accent | #d477f3violet | #d477f3violet |
| Accent foreground | #280434midnightblue | #280434midnightblue |
| Destructive | #bd220afirebrick | #f5563dtomato |
| Destructive foreground | #fffbfasnow | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #96f377lightgreen | #96f377lightgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.50:1 | AAA |
| Text on card | 19.52:1 | AAA |
| Primary button | 10.16:1 | AAA |
| Secondary button | 6.68:1 | AA |
| Muted text | 7.08:1 | AAA |
| Accent | 6.68:1 | AA |
| Destructive | 6.02:1 | AA |
| Text on background | 19.11:1 | AAA |
| Text on card | 19.05:1 | AAA |
| Primary button | 10.16:1 | AAA |
| Secondary button | 6.68:1 | AA |
| Muted text | 8.49:1 | AAA |
| Accent | 6.68:1 | AA |
| Destructive | 6.26:1 | AA |
Paste this into your globals.css to use Coconut in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.987 0.006 137.773);
--foreground: oklch(0.125 0.024 135.869);
--muted: oklch(0.94 0.017 317.734);
--muted-foreground: oklch(0.42 0.021 317.681);
--popover: oklch(0.981 0.008 137.778);
--popover-foreground: oklch(0.099 0.019 135.869);
--card: oklch(0.981 0.008 137.778);
--card-foreground: oklch(0.099 0.019 135.869);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.879 0.183 138.415);
--primary-foreground: oklch(0.287 0.084 139.105);
--secondary: oklch(0.719 0.195 317.108);
--secondary-foreground: oklch(0.211 0.091 316.062);
--accent: oklch(0.719 0.195 317.108);
--accent-foreground: oklch(0.211 0.091 316.062);
--destructive: oklch(0.515 0.192 31.35);
--destructive-foreground: oklch(0.99 0.004 27.955);
--ring: oklch(0.879 0.183 138.415);
--chart-1: oklch(0.879 0.183 138.415);
--chart-2: oklch(0.719 0.195 317.108);
--chart-3: oklch(0.719 0.195 317.108);
--chart-4: oklch(0.745 0.176 317.248);
--chart-5: oklch(0.884 0.189 138.451);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.155 0.02 137.014);
--foreground: oklch(0.993 0.002 137.767);
--muted: oklch(0.173 0.025 317.505);
--muted-foreground: oklch(0.75 0.018 317.723);
--popover: oklch(0.17 0.024 137.702);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.17 0.024 137.702);
--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.879 0.183 138.415);
--primary-foreground: oklch(0.287 0.084 139.105);
--secondary: oklch(0.719 0.195 317.108);
--secondary-foreground: oklch(0.211 0.091 316.062);
--accent: oklch(0.719 0.195 317.108);
--accent-foreground: oklch(0.211 0.091 316.062);
--destructive: oklch(0.664 0.199 31.431);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.879 0.183 138.415);
--chart-1: oklch(0.879 0.183 138.415);
--chart-2: oklch(0.719 0.195 317.108);
--chart-3: oklch(0.719 0.195 317.108);
--chart-4: oklch(0.745 0.176 317.248);
--chart-5: oklch(0.884 0.189 138.451);
}