Neck for shadcn/ui

Neck is a shadcn/ui theme built around a muted green primary color (#60745d) with neutral gray accents (#e0e1e0). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted green primary (#60745d) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#030802black
#f9fcf8mintcream
Card
#ffffffwhite
#000000black
Card foreground
#030802black
#f9fcf8mintcream
Popover
#ffffffwhite
#000000black
Popover foreground
#030802black
#f9fcf8mintcream
Primary
#60745ddimgray
#60745ddimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#e0e1e0gainsboro
#1c221bblack
Secondary foreground
#464946darkslategray
#b2c0afsilver
Muted
#dbe7d9gainsboro
#1a2618black
Muted foreground
#616660dimgray
#999f99darkgray
Accent
#e0e1e0gainsboro
#1c221bblack
Accent foreground
#464946darkslategray
#b2c0afsilver
Destructive
#890a01darkred
#fe2f20orangered
Destructive foreground
#ffc1bdlightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#60745ddimgray
#60745ddimgray

Contrast

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

Light mode
Text on background20.20:1AAA
Text on card20.20:1AAA
Primary button5.04:1AA
Secondary button6.95:1AA
Muted text4.61:1AA
Accent6.95:1AA
Destructive6.46:1AA
Dark mode
Text on background20.30:1AAA
Text on card20.30:1AAA
Primary button5.04:1AA
Secondary button8.52:1AAA
Muted text5.85:1AA
Accent8.52:1AAA
Destructive3.73:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.124 0.025 139.117);
  --muted: oklch(0.916 0.023 141.011);
  --muted-foreground: oklch(0.505 0.011 141.017);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.124 0.025 139.117);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.124 0.025 139.117);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.536 0.042 140.896);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.909 0.002 141.06);
  --secondary-foreground: oklch(0.401 0.006 141.034);
  --accent: oklch(0.909 0.002 141.06);
  --accent-foreground: oklch(0.401 0.006 141.034);
  --destructive: oklch(0.4 0.158 30.278);
  --destructive-foreground: oklch(0.866 0.071 23.31);
  --ring: oklch(0.536 0.042 140.896);
  --chart-1: oklch(0.536 0.042 140.896);
  --chart-2: oklch(0.909 0.002 141.06);
  --chart-3: oklch(0.909 0.002 141.06);
  --chart-4: oklch(0.932 0.001 141.062);
  --chart-5: oklch(0.542 0.053 140.857);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.987 0.006 141.052);
  --muted: oklch(0.251 0.031 140.812);
  --muted-foreground: oklch(0.695 0.01 141.033);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.987 0.006 141.052);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.987 0.006 141.052);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.536 0.042 140.896);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.244 0.016 140.92);
  --secondary-foreground: oklch(0.792 0.029 140.986);
  --accent: oklch(0.244 0.016 140.92);
  --accent-foreground: oklch(0.792 0.029 140.986);
  --destructive: oklch(0.643 0.24 29.568);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.536 0.042 140.896);
  --chart-1: oklch(0.536 0.042 140.896);
  --chart-2: oklch(0.244 0.016 140.92);
  --chart-3: oklch(0.244 0.016 140.92);
  --chart-4: oklch(0.278 0.02 140.911);
  --chart-5: oklch(0.542 0.053 140.857);
}