Needle for shadcn/ui

Needle is a shadcn/ui theme built around a neutral gray primary color (#363636) with neutral gray accents (#363636). The light mode uses a neutral background (#fdf7f7). Dark mode keeps the neutral gray primary (#363636) on a red-tinted background (#0c0303).

Color palette

TokenLightDark
Background
#fdf7f7snow
#0c0303black
Foreground
#000000black
#fdfcfcsnow
Card
#fcf3f3lavenderblush
#100404black
Card foreground
#000000black
#ffffffwhite
Popover
#fdf7f7snow
#0c0303black
Popover foreground
#000000black
#fdfcfcsnow
Primary
#363636darkslategray
#363636darkslategray
Primary foreground
#cfcfcflightgrey
#cfcfcflightgrey
Secondary
#363636darkslategray
#363636darkslategray
Secondary foreground
#cfcfcflightgrey
#cfcfcflightgrey
Muted
#ecdadagainsboro
#251313black
Muted foreground
#6d5a5adimgray
#a59292rosybrown
Accent
#363636darkslategray
#363636darkslategray
Accent foreground
#cfcfcflightgrey
#cfcfcflightgrey
Destructive
#92390csaddlebrown
#ed6521chocolate
Destructive foreground
#fce2d5antiquewhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#363636darkslategray
#363636darkslategray

Contrast

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

Light mode
Text on background19.79:1AAA
Text on card19.20:1AAA
Primary button7.80:1AAA
Secondary button7.80:1AAA
Muted text4.77:1AA
Accent7.80:1AAA
Destructive6.04:1AA
Dark mode
Text on background19.88:1AAA
Text on card20.13:1AAA
Primary button7.80:1AAA
Secondary button7.80:1AAA
Muted text6.03:1AA
Accent7.80:1AAA
Destructive6.49:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.007 17.272);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.902 0.02 17.538);
  --muted-foreground: oklch(0.486 0.026 18.09);
  --popover: oklch(0.98 0.007 17.272);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.97 0.01 17.332);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.331 0 180);
  --primary-foreground: oklch(0.853 0 168.69);
  --secondary: oklch(0.331 0 180);
  --secondary-foreground: oklch(0.853 0 168.69);
  --accent: oklch(0.331 0 180);
  --accent-foreground: oklch(0.853 0 168.69);
  --destructive: oklch(0.462 0.132 42.2);
  --destructive-foreground: oklch(0.929 0.034 48.338);
  --ring: oklch(0.331 0 180);
  --chart-1: oklch(0.331 0 180);
  --chart-2: oklch(0.331 0 180);
  --chart-3: oklch(0.331 0 180);
  --chart-4: oklch(0.361 0 180);
  --chart-5: oklch(0.328 0.005 17.388);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.119 0.021 20.72);
  --foreground: oklch(0.991 0.002 17.187);
  --muted: oklch(0.212 0.031 19.958);
  --muted-foreground: oklch(0.676 0.024 17.756);
  --popover: oklch(0.119 0.021 20.72);
  --popover-foreground: oklch(0.991 0.002 17.187);
  --card: oklch(0.132 0.024 20.908);
  --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.331 0 180);
  --primary-foreground: oklch(0.853 0 168.69);
  --secondary: oklch(0.331 0 180);
  --secondary-foreground: oklch(0.853 0 168.69);
  --accent: oklch(0.331 0 180);
  --accent-foreground: oklch(0.853 0 168.69);
  --destructive: oklch(0.669 0.184 42.901);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.331 0 180);
  --chart-1: oklch(0.331 0 180);
  --chart-2: oklch(0.331 0 180);
  --chart-3: oklch(0.331 0 180);
  --chart-4: oklch(0.361 0 180);
  --chart-5: oklch(0.328 0.005 17.388);
}