Portly for shadcn/ui

Portly is a shadcn/ui theme built around a muted light green primary color (#d5e6da) with neutral gray accents (#dddfde). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted light green primary (#d5e6da) on a green-tinted background (#050b06).

Color palette

TokenLightDark
Background
#ffffffwhite
#050b06black
Foreground
#010402black
#f9fbfamintcream
Card
#ffffffwhite
#050b06black
Card foreground
#010402black
#f9fbfamintcream
Popover
#ffffffwhite
#050b06black
Popover foreground
#010402black
#f9fbfamintcream
Primary
#d5e6dagainsboro
#d5e6dagainsboro
Primary foreground
#33573edarkslategray
#33573edarkslategray
Secondary
#dddfdegainsboro
#1d261fblack
Secondary foreground
#434644darkslategray
#b1c4b6silver
Muted
#d2dfd6gainsboro
#202d24darkslategray
Muted foreground
#626a64dimgray
#959d97darkgray
Accent
#dddfdegainsboro
#1d261fblack
Accent foreground
#434644darkslategray
#b1c4b6silver
Destructive
#7d1507maroon
#f34730tomato
Destructive foreground
#fbc3bclightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d5e6dagainsboro
#d5e6dagainsboro

Contrast

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

Light mode
Text on background20.59:1AAA
Text on card20.59:1AAA
Primary button6.30:1AA
Secondary button7.11:1AAA
Muted text4.06:1AA Large
Accent7.11:1AAA
Destructive6.85:1AA
Dark mode
Text on background19.15:1AAA
Text on card19.15:1AAA
Primary button6.30:1AA
Secondary button8.50:1AAA
Muted text5.17:1AA
Accent8.50:1AAA
Destructive3.65:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.099 0.018 155.304);
  --muted: oklch(0.892 0.019 155.467);
  --muted-foreground: oklch(0.516 0.013 155.367);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.099 0.018 155.304);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.099 0.018 155.304);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.91 0.024 155.348);
  --primary-foreground: oklch(0.421 0.059 152.785);
  --secondary: oklch(0.901 0.002 155.828);
  --secondary-foreground: oklch(0.392 0.005 155.632);
  --accent: oklch(0.901 0.002 155.828);
  --accent-foreground: oklch(0.392 0.005 155.632);
  --destructive: oklch(0.383 0.14 31.068);
  --destructive-foreground: oklch(0.865 0.066 27.131);
  --ring: oklch(0.91 0.024 155.348);
  --chart-1: oklch(0.91 0.024 155.348);
  --chart-2: oklch(0.901 0.002 155.828);
  --chart-3: oklch(0.901 0.002 155.828);
  --chart-4: oklch(0.924 0.001 155.838);
  --chart-5: oklch(0.911 0.027 155.288);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.015 155.531);
  --foreground: oklch(0.985 0.002 155.835);
  --muted: oklch(0.281 0.024 154.089);
  --muted-foreground: oklch(0.688 0.012 155.521);
  --popover: oklch(0.138 0.015 155.531);
  --popover-foreground: oklch(0.985 0.002 155.835);
  --card: oklch(0.138 0.015 155.531);
  --card-foreground: oklch(0.985 0.002 155.835);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.91 0.024 155.348);
  --primary-foreground: oklch(0.421 0.059 152.785);
  --secondary: oklch(0.256 0.018 154.462);
  --secondary-foreground: oklch(0.801 0.028 155.182);
  --accent: oklch(0.256 0.018 154.462);
  --accent-foreground: oklch(0.801 0.028 155.182);
  --destructive: oklch(0.644 0.212 30.9);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.91 0.024 155.348);
  --chart-1: oklch(0.91 0.024 155.348);
  --chart-2: oklch(0.256 0.018 154.462);
  --chart-3: oklch(0.256 0.018 154.462);
  --chart-4: oklch(0.29 0.021 154.379);
  --chart-5: oklch(0.911 0.027 155.288);
}