Pecan for shadcn/ui

Pecan is a shadcn/ui theme built around a neutral gray primary color (#dedede) with neutral gray accents (#dedede). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#dedede) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#100505black
#ffffffwhite
Card
#ffffffwhite
#000000black
Card foreground
#100505black
#ffffffwhite
Popover
#ffffffwhite
#000000black
Popover foreground
#100505black
#ffffffwhite
Primary
#dededegainsboro
#dededegainsboro
Primary foreground
#454545darkslategray
#454545darkslategray
Secondary
#dededegainsboro
#dededegainsboro
Secondary foreground
#454545darkslategray
#454545darkslategray
Muted
#e3cecelightgrey
#311c1cblack
Muted foreground
#685a5adimgray
#a59797rosybrown
Accent
#dededegainsboro
#dededegainsboro
Accent foreground
#454545darkslategray
#454545darkslategray
Destructive
#ac4511saddlebrown
#e35b16chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#dededegainsboro
#dededegainsboro

Contrast

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

Light mode
Text on background20.07:1AAA
Text on card20.07:1AAA
Primary button7.11:1AAA
Secondary button7.11:1AAA
Muted text4.37:1AA Large
Accent7.11:1AAA
Destructive5.83:1AA
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.11:1AAA
Secondary button7.11:1AAA
Muted text5.71:1AA
Accent7.11:1AAA
Destructive3.63:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.133 0.022 20.4);
  --muted: oklch(0.869 0.024 17.623);
  --muted-foreground: oklch(0.481 0.018 17.784);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.133 0.022 20.4);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.133 0.022 20.4);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.9 0 188.746);
  --primary-foreground: oklch(0.39 0 165.964);
  --secondary: oklch(0.9 0 188.746);
  --secondary-foreground: oklch(0.39 0 165.964);
  --accent: oklch(0.9 0 188.746);
  --accent-foreground: oklch(0.39 0 165.964);
  --destructive: oklch(0.521 0.147 42.347);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.9 0 188.746);
  --chart-1: oklch(0.9 0 188.746);
  --chart-2: oklch(0.9 0 188.746);
  --chart-3: oklch(0.9 0 188.746);
  --chart-4: oklch(0.923 0 153.435);
  --chart-5: oklch(0.899 0.002 17.198);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.253 0.034 19.717);
  --muted-foreground: oklch(0.689 0.016 17.549);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --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.9 0 188.746);
  --primary-foreground: oklch(0.39 0 165.964);
  --secondary: oklch(0.9 0 188.746);
  --secondary-foreground: oklch(0.39 0 165.964);
  --accent: oklch(0.9 0 188.746);
  --accent-foreground: oklch(0.39 0 165.964);
  --destructive: oklch(0.64 0.184 41.914);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.9 0 188.746);
  --chart-1: oklch(0.9 0 188.746);
  --chart-2: oklch(0.9 0 188.746);
  --chart-3: oklch(0.9 0 188.746);
  --chart-4: oklch(0.923 0 153.435);
  --chart-5: oklch(0.899 0.002 17.198);
}