Stockings for shadcn/ui

Stockings is a shadcn/ui theme built around a neutral gray primary color (#343833) with neutral gray accents (#373338). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#343833) on a green-tinted background (#070a05).

Color palette

TokenLightDark
Background
#ffffffwhite
#070a05black
Foreground
#020401black
#ffffffwhite
Card
#ffffffwhite
#070a05black
Card foreground
#020401black
#ffffffwhite
Popover
#ffffffwhite
#070a05black
Popover foreground
#020401black
#ffffffwhite
Primary
#343833darkslategray
#343833darkslategray
Primary foreground
#cdd1cclightgrey
#cdd1cclightgrey
Secondary
#373338darkslategray
#373338darkslategray
Secondary foreground
#d0ccd1lightgrey
#d0ccd1lightgrey
Muted
#ebeaeclavender
#151315black
Muted foreground
#534659darkslategray
#b4a6b9darkgray
Accent
#373338darkslategray
#373338darkslategray
Accent foreground
#d0ccd1lightgrey
#d0ccd1lightgrey
Destructive
#ab3b07saddlebrown
#f5540aorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#343833darkslategray
#343833darkslategray

Contrast

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

Light mode
Text on background20.58:1AAA
Text on card20.58:1AAA
Primary button7.69:1AAA
Secondary button7.83:1AAA
Muted text7.31:1AAA
Accent7.83:1AAA
Destructive6.22:1AA
Dark mode
Text on background19.91:1AAA
Text on card19.91:1AAA
Primary button7.69:1AAA
Secondary button7.83:1AAA
Muted text7.98:1AAA
Accent7.83:1AAA
Destructive3.40:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.099 0.016 135.571);
  --muted: oklch(0.938 0.003 317.182);
  --muted-foreground: oklch(0.414 0.036 316.991);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.099 0.016 135.571);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.099 0.016 135.571);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.336 0.011 137.265);
  --primary-foreground: oklch(0.856 0.008 137.21);
  --secondary: oklch(0.327 0.011 317.114);
  --secondary-foreground: oklch(0.85 0.008 317.169);
  --accent: oklch(0.327 0.011 317.114);
  --accent-foreground: oklch(0.85 0.008 317.169);
  --destructive: oklch(0.508 0.156 39.715);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.336 0.011 137.265);
  --chart-1: oklch(0.336 0.011 137.265);
  --chart-2: oklch(0.327 0.011 317.114);
  --chart-3: oklch(0.327 0.011 317.114);
  --chart-4: oklch(0.356 0.012 317.112);
  --chart-5: oklch(0.339 0.017 137.312);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.014 136.212);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.191 0.005 317.133);
  --muted-foreground: oklch(0.744 0.031 317.095);
  --popover: oklch(0.138 0.014 136.212);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.138 0.014 136.212);
  --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.336 0.011 137.265);
  --primary-foreground: oklch(0.856 0.008 137.21);
  --secondary: oklch(0.327 0.011 317.114);
  --secondary-foreground: oklch(0.85 0.008 317.169);
  --accent: oklch(0.327 0.011 317.114);
  --accent-foreground: oklch(0.85 0.008 317.169);
  --destructive: oklch(0.659 0.208 39.046);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.336 0.011 137.265);
  --chart-1: oklch(0.336 0.011 137.265);
  --chart-2: oklch(0.327 0.011 317.114);
  --chart-3: oklch(0.327 0.011 317.114);
  --chart-4: oklch(0.356 0.012 317.112);
  --chart-5: oklch(0.339 0.017 137.312);
}