Cockroach is a shadcn/ui theme built around a green primary color (#6abe91) with muted light green accents (#c5ddd0). The light mode uses a neutral background (#fbfefc). Dark mode keeps the green primary (#6abe91) on a neutral background (#030805).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfefcwhite | #030805black |
| Foreground | #04150cblack | #f9fbfamintcream |
| Card | #fbfefcwhite | #030805black |
| Card foreground | #04150cblack | #f9fbfamintcream |
| Popover | #fbfefcwhite | #030805black |
| Popover foreground | #04150cblack | #f9fbfamintcream |
| Primary | #6abe91mediumaquamarine | #6abe91mediumaquamarine |
| Primary foreground | #000000black | #000000black |
| Secondary | #dee7e3gainsboro | #131b17black |
| Secondary foreground | #3e5649darkslategray | #a1bfafdarkgray |
| Muted | #e3ede8lavender | #121c17black |
| Muted foreground | #46584edarkslategray | #a7b9afdarkgray |
| Accent | #c5ddd0lightgrey | #223a2ddarkslategray |
| Accent foreground | #2a4737darkslategray | #b8d6c6silver |
| Destructive | #741c02maroon | #fb4913orangered |
| Destructive foreground | #febdaalightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #6abe91mediumaquamarine | #6abe91mediumaquamarine |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.50:1 | AAA |
| Text on card | 18.50:1 | AAA |
| Primary button | 9.36:1 | AAA |
| Secondary button | 6.34:1 | AA |
| Muted text | 6.35:1 | AA |
| Accent | 7.12:1 | AAA |
| Destructive | 6.85:1 | AA |
| Text on background | 19.45:1 | AAA |
| Text on card | 19.45:1 | AAA |
| Primary button | 9.36:1 | AAA |
| Secondary button | 8.83:1 | AAA |
| Muted text | 8.46:1 | AAA |
| Accent | 7.85:1 | AAA |
| Destructive | 3.45:1 | AA Large |
Paste this into your globals.css to use Cockroach in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.004 163.348);
--foreground: oklch(0.178 0.031 159.392);
--muted: oklch(0.938 0.013 163.077);
--muted-foreground: oklch(0.442 0.026 161.841);
--popover: oklch(0.994 0.004 163.348);
--popover-foreground: oklch(0.178 0.031 159.392);
--card: oklch(0.994 0.004 163.348);
--card-foreground: oklch(0.178 0.031 159.392);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.735 0.105 159.021);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.921 0.012 163.126);
--secondary-foreground: oklch(0.429 0.036 161.135);
--accent: oklch(0.876 0.031 162.528);
--accent-foreground: oklch(0.368 0.045 159.872);
--destructive: oklch(0.371 0.126 35.792);
--destructive-foreground: oklch(0.853 0.08 37.609);
--ring: oklch(0.735 0.105 159.021);
--chart-1: oklch(0.735 0.105 159.021);
--chart-2: oklch(0.921 0.012 163.126);
--chart-3: oklch(0.876 0.031 162.528);
--chart-4: oklch(0.943 0.008 163.22);
--chart-5: oklch(0.741 0.112 158.684);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.123 0.015 163.507);
--foreground: oklch(0.986 0.002 163.398);
--muted: oklch(0.215 0.019 160.993);
--muted-foreground: oklch(0.769 0.023 162.66);
--popover: oklch(0.123 0.015 163.507);
--popover-foreground: oklch(0.986 0.002 163.398);
--card: oklch(0.123 0.015 163.507);
--card-foreground: oklch(0.986 0.002 163.398);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.735 0.105 159.021);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.213 0.016 161.42);
--secondary-foreground: oklch(0.778 0.04 162.088);
--accent: oklch(0.325 0.039 159.893);
--accent-foreground: oklch(0.849 0.039 162.224);
--destructive: oklch(0.658 0.222 35.252);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.735 0.105 159.021);
--chart-1: oklch(0.735 0.105 159.021);
--chart-2: oklch(0.213 0.016 161.42);
--chart-3: oklch(0.325 0.039 159.893);
--chart-4: oklch(0.249 0.02 161.207);
--chart-5: oklch(0.741 0.112 158.684);
}