Pork for shadcn/ui

Pork is a shadcn/ui theme built around a muted green primary color (#3e6237) with muted light green accents (#d8e0d6). The light mode uses a neutral background (#fcfdfb). Dark mode keeps the muted green primary (#3e6237) on a neutral background (#020401).

Color palette

TokenLightDark
Background
#fcfdfbsnow
#020401black
Foreground
#000000black
#f9fbf8mintcream
Card
#f9fcf8mintcream
#040703black
Card foreground
#000000black
#fcfdfcwhite
Popover
#f9fcf8mintcream
#040703black
Popover foreground
#000000black
#fcfdfcwhite
Primary
#3e6237darkolivegreen
#3e6237darkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d8e0d6gainsboro
#273224darkslategray
Secondary foreground
#3c4c39darkslategray
#becebbsilver
Muted
#e2ebe0gainsboro
#161f14black
Muted foreground
#545a53dimgray
#a6aca5darkgray
Accent
#d8e0d6gainsboro
#273224darkslategray
Accent foreground
#3c4c39darkslategray
#becebbsilver
Destructive
#b83205firebrick
#f94a10orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3e6237darkolivegreen
#3e6237darkolivegreen

Contrast

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

Light mode
Text on background20.63:1AAA
Text on card20.28:1AAA
Primary button6.98:1AA
Secondary button6.82:1AA
Muted text5.79:1AA
Accent6.82:1AA
Destructive6.02:1AA
Dark mode
Text on background19.81:1AAA
Text on card19.85:1AAA
Primary button6.98:1AA
Secondary button8.09:1AAA
Muted text7.31:1AAA
Accent8.09:1AAA
Destructive3.48:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 140.527);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.93 0.017 140.503);
  --muted-foreground: oklch(0.461 0.013 140.487);
  --popover: oklch(0.987 0.006 140.521);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.987 0.006 140.521);
  --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.457 0.079 140.339);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.898 0.016 140.504);
  --secondary-foreground: oklch(0.396 0.036 140.398);
  --accent: oklch(0.898 0.016 140.504);
  --accent-foreground: oklch(0.396 0.036 140.398);
  --destructive: oklch(0.519 0.177 35.502);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.457 0.079 140.339);
  --chart-1: oklch(0.457 0.079 140.339);
  --chart-2: oklch(0.898 0.016 140.504);
  --chart-3: oklch(0.898 0.016 140.504);
  --chart-4: oklch(0.92 0.013 140.51);
  --chart-5: oklch(0.462 0.086 140.341);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.097 0.013 139.229);
  --foreground: oklch(0.987 0.005 140.524);
  --muted: oklch(0.226 0.024 140.381);
  --muted-foreground: oklch(0.737 0.012 140.507);
  --popover: oklch(0.122 0.017 139.229);
  --popover-foreground: oklch(0.993 0.002 140.528);
  --card: oklch(0.122 0.017 139.229);
  --card-foreground: oklch(0.993 0.002 140.528);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.457 0.079 140.339);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.303 0.029 140.393);
  --secondary-foreground: oklch(0.833 0.031 140.475);
  --accent: oklch(0.303 0.029 140.393);
  --accent-foreground: oklch(0.833 0.031 140.475);
  --destructive: oklch(0.655 0.219 35.892);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.457 0.079 140.339);
  --chart-1: oklch(0.457 0.079 140.339);
  --chart-2: oklch(0.303 0.029 140.393);
  --chart-3: oklch(0.303 0.029 140.393);
  --chart-4: oklch(0.335 0.033 140.389);
  --chart-5: oklch(0.462 0.086 140.341);
}