Cockroach for shadcn/ui

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).

Color palette

TokenLightDark
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

Contrast

WCAG 2 contrast ratios between each background and its foreground color.

Light mode
Text on background18.50:1AAA
Text on card18.50:1AAA
Primary button9.36:1AAA
Secondary button6.34:1AA
Muted text6.35:1AA
Accent7.12:1AAA
Destructive6.85:1AA
Dark mode
Text on background19.45:1AAA
Text on card19.45:1AAA
Primary button9.36:1AAA
Secondary button8.83:1AAA
Muted text8.46:1AAA
Accent7.85:1AAA
Destructive3.45:1AA Large

CSS variables

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);
}