Sticky for shadcn/ui

Sticky is a shadcn/ui theme built around a muted green primary color (#5f6549) with muted light green accents (#d8dbcc). The light mode uses a neutral background (#fdfdfc). Dark mode keeps the muted green primary (#5f6549) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdfdfcwhite
#000000black
Foreground
#0b0e02black
#f8f8f6whitesmoke
Card
#fdfdfcwhite
#000000black
Card foreground
#0b0e02black
#f8f8f6whitesmoke
Popover
#fdfdfcwhite
#000000black
Popover foreground
#0b0e02black
#f8f8f6whitesmoke
Primary
#5f6549darkolivegreen
#5f6549darkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d8dbcclightgrey
#2c2e24darkslategray
Secondary foreground
#414530darkslategray
#c6c9basilver
Muted
#ebede3beige
#1a1c12black
Muted foreground
#5b6148darkolivegreen
#b2b79edarkgray
Accent
#d8dbcclightgrey
#2c2e24darkslategray
Accent foreground
#414530darkslategray
#c6c9basilver
Destructive
#d24c0fchocolate
#e05210chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5f6549darkolivegreen
#5f6549darkolivegreen

Contrast

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

Light mode
Text on background19.15:1AAA
Text on card19.15:1AAA
Primary button6.13:1AA
Secondary button7.06:1AAA
Muted text5.47:1AA
Accent7.06:1AAA
Destructive4.38:1AA Large
Dark mode
Text on background19.74:1AAA
Text on card19.74:1AAA
Primary button6.13:1AA
Secondary button8.21:1AAA
Muted text8.32:1AAA
Accent8.21:1AAA
Destructive3.90:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.002 116.368);
  --foreground: oklch(0.154 0.029 117.655);
  --muted: oklch(0.942 0.014 116.605);
  --muted-foreground: oklch(0.48 0.039 117.837);
  --popover: oklch(0.994 0.002 116.368);
  --popover-foreground: oklch(0.154 0.029 117.655);
  --card: oklch(0.994 0.002 116.368);
  --card-foreground: oklch(0.154 0.029 117.655);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.492 0.043 117.933);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.886 0.021 116.767);
  --secondary-foreground: oklch(0.381 0.035 118.012);
  --accent: oklch(0.886 0.021 116.767);
  --accent-foreground: oklch(0.381 0.035 118.012);
  --destructive: oklch(0.593 0.18 40.087);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.492 0.043 117.933);
  --chart-1: oklch(0.492 0.043 117.933);
  --chart-2: oklch(0.886 0.021 116.767);
  --chart-3: oklch(0.886 0.021 116.767);
  --chart-4: oklch(0.906 0.017 116.681);
  --chart-5: oklch(0.499 0.05 118.199);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.979 0.002 116.376);
  --muted: oklch(0.221 0.02 117.986);
  --muted-foreground: oklch(0.77 0.035 117.169);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.979 0.002 116.376);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.979 0.002 116.376);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.492 0.043 117.933);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.294 0.017 117.409);
  --secondary-foreground: oklch(0.83 0.02 116.777);
  --accent: oklch(0.294 0.017 117.409);
  --accent-foreground: oklch(0.83 0.02 116.777);
  --destructive: oklch(0.623 0.19 39.985);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.492 0.043 117.933);
  --chart-1: oklch(0.492 0.043 117.933);
  --chart-2: oklch(0.294 0.017 117.409);
  --chart-3: oklch(0.294 0.017 117.409);
  --chart-4: oklch(0.328 0.02 117.451);
  --chart-5: oklch(0.499 0.05 118.199);
}