Grocery for shadcn/ui

Grocery is a shadcn/ui theme built around a near-black primary color (#000000) with near-black accents (#000000). The light mode uses a neutral background (#fcf8f8). Dark mode keeps the near-black primary (#000000) on a neutral background (#040101).

Color palette

TokenLightDark
Background
#fcf8f8snow
#040101black
Foreground
#170303black
#f9f6f6whitesmoke
Card
#fcf8f8snow
#040101black
Card foreground
#170303black
#f9f6f6whitesmoke
Popover
#fcf8f8snow
#040101black
Popover foreground
#170303black
#f9f6f6whitesmoke
Primary
#000000black
#000000black
Primary foreground
#999999darkgray
#999999darkgray
Secondary
#000000black
#000000black
Secondary foreground
#999999darkgray
#999999darkgray
Muted
#f2e8e8linen
#170d0dblack
Muted foreground
#594545darkolivegreen
#baa6a6darkgray
Accent
#000000black
#000000black
Accent foreground
#999999darkgray
#999999darkgray
Destructive
#5f2107maroon
#ee5e20chocolate
Destructive foreground
#f8baa0lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#000000black
#000000black

Contrast

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

Light mode
Text on background18.97:1AAA
Text on card18.97:1AAA
Primary button7.37:1AAA
Secondary button7.37:1AAA
Muted text7.41:1AAA
Accent7.37:1AAA
Destructive7.31:1AAA
Dark mode
Text on background19.33:1AAA
Text on card19.33:1AAA
Primary button7.37:1AAA
Secondary button7.37:1AAA
Muted text8.27:1AAA
Accent7.37:1AAA
Destructive6.26:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.003 17.217);
  --foreground: oklch(0.14 0.04 23.913);
  --muted: oklch(0.94 0.01 17.343);
  --muted-foreground: oklch(0.411 0.028 18.372);
  --popover: oklch(0.982 0.003 17.217);
  --popover-foreground: oklch(0.14 0.04 23.913);
  --card: oklch(0.982 0.003 17.217);
  --card-foreground: oklch(0.14 0.04 23.913);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0 0 0);
  --primary-foreground: oklch(0.683 0 180);
  --secondary: oklch(0 0 0);
  --secondary-foreground: oklch(0.683 0 180);
  --accent: oklch(0 0 0);
  --accent-foreground: oklch(0.683 0 180);
  --destructive: oklch(0.339 0.096 40.703);
  --destructive-foreground: oklch(0.84 0.08 44.243);
  --ring: oklch(0 0 0);
  --chart-1: oklch(0 0 0);
  --chart-2: oklch(0 0 0);
  --chart-3: oklch(0 0 0);
  --chart-4: oklch(0.132 0 165.964);
  --chart-5: oklch(0 0 0);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.082 0.014 20.688);
  --foreground: oklch(0.975 0.003 17.211);
  --muted: oklch(0.173 0.017 18.918);
  --muted-foreground: oklch(0.742 0.024 17.706);
  --popover: oklch(0.082 0.014 20.688);
  --popover-foreground: oklch(0.975 0.003 17.211);
  --card: oklch(0.082 0.014 20.688);
  --card-foreground: oklch(0.975 0.003 17.211);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0 0 0);
  --primary-foreground: oklch(0.683 0 180);
  --secondary: oklch(0 0 0);
  --secondary-foreground: oklch(0.683 0 180);
  --accent: oklch(0 0 0);
  --accent-foreground: oklch(0.683 0 180);
  --destructive: oklch(0.661 0.191 40.353);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0 0 0);
  --chart-1: oklch(0 0 0);
  --chart-2: oklch(0 0 0);
  --chart-3: oklch(0 0 0);
  --chart-4: oklch(0.132 0 165.964);
  --chart-5: oklch(0 0 0);
}