Crab for shadcn/ui

Crab is a shadcn/ui theme built around a vivid deep blue primary color (#032686) with vivid deep green accents (#268603). The light mode uses a neutral background (#f8f9fc). Dark mode keeps the vivid deep blue primary (#032686) on a blue-tinted background (#05070a).

Color palette

TokenLightDark
Background
#f8f9fcghostwhite
#05070ablack
Foreground
#040710black
#ffffffwhite
Card
#f8f9fcghostwhite
#05070ablack
Card foreground
#040710black
#ffffffwhite
Popover
#f8f9fcghostwhite
#05070ablack
Popover foreground
#040710black
#ffffffwhite
Primary
#032686midnightblue
#032686midnightblue
Primary foreground
#becffdlightblue
#becffdlightblue
Secondary
#860326darkred
#860326darkred
Secondary foreground
#fdbecfpink
#fdbecfpink
Muted
#ece9ealinen
#161314black
Muted foreground
#626060dimgray
#9f9d9edarkgray
Accent
#268603forestgreen
#268603forestgreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#7c1d03maroon
#f43a06orangered
Destructive foreground
#fdc4b4lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#032686midnightblue
#032686midnightblue

Contrast

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

Light mode
Text on background19.12:1AAA
Text on card19.12:1AAA
Primary button8.29:1AAA
Secondary button6.52:1AA
Muted text5.19:1AA
Accent4.65:1AA
Destructive6.72:1AA
Dark mode
Text on background20.19:1AAA
Text on card20.19:1AAA
Primary button8.29:1AAA
Secondary button6.52:1AA
Muted text6.84:1AA
Accent4.65:1AA
Destructive3.86:1AA Large

CSS variables

Paste this into your globals.css to use Crab in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.004 270.088);
  --foreground: oklch(0.131 0.022 263.456);
  --muted: oklch(0.937 0.003 358.868);
  --muted-foreground: oklch(0.491 0.003 358.934);
  --popover: oklch(0.982 0.004 270.088);
  --popover-foreground: oklch(0.131 0.022 263.456);
  --card: oklch(0.982 0.004 270.088);
  --card-foreground: oklch(0.131 0.022 263.456);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.328 0.163 263.622);
  --primary-foreground: oklch(0.858 0.067 269.312);
  --secondary: oklch(0.396 0.156 16.975);
  --secondary-foreground: oklch(0.864 0.075 1.167);
  --accent: oklch(0.544 0.174 140.189);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.389 0.134 34.831);
  --destructive-foreground: oklch(0.868 0.069 35.996);
  --ring: oklch(0.328 0.163 263.622);
  --chart-1: oklch(0.328 0.163 263.622);
  --chart-2: oklch(0.396 0.156 16.975);
  --chart-3: oklch(0.544 0.174 140.189);
  --chart-4: oklch(0.427 0.169 17.377);
  --chart-5: oklch(0.328 0.167 263.418);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.009 266.514);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.191 0.004 359.399);
  --muted-foreground: oklch(0.698 0.002 358.88);
  --popover: oklch(0.126 0.009 266.514);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.126 0.009 266.514);
  --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.328 0.163 263.622);
  --primary-foreground: oklch(0.858 0.067 269.312);
  --secondary: oklch(0.396 0.156 16.975);
  --secondary-foreground: oklch(0.864 0.075 1.167);
  --accent: oklch(0.544 0.174 140.189);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.631 0.227 33.635);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.328 0.163 263.622);
  --chart-1: oklch(0.328 0.163 263.622);
  --chart-2: oklch(0.396 0.156 16.975);
  --chart-3: oklch(0.544 0.174 140.189);
  --chart-4: oklch(0.427 0.169 17.377);
  --chart-5: oklch(0.328 0.167 263.418);
}