Portly for shadcn/ui

Portly is a shadcn/ui theme built around a green primary color (#67822b) with green accents (#3b822b). The light mode uses a neutral background (#fbfdf7). Dark mode keeps the green primary (#67822b) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfdf7snow
#000000black
Foreground
#000000black
#ffffffwhite
Card
#fbfdf7snow
#000000black
Card foreground
#000000black
#ffffffwhite
Popover
#fbfdf7snow
#000000black
Popover foreground
#000000black
#ffffffwhite
Primary
#67822bolivedrab
#67822bolivedrab
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#82722bolivedrab
#82722bolivedrab
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f6f3ealinen
#151309black
Muted foreground
#464643darkslategray
#bcbbb9silver
Accent
#3b822bforestgreen
#3b822bforestgreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#990c0adarkred
#e6120fred
Destructive foreground
#fdd9d9mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#67822bolivedrab
#67822bolivedrab

Contrast

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

Light mode
Text on background20.46:1AAA
Text on card20.46:1AAA
Primary button4.37:1AA Large
Secondary button4.77:1AA
Muted text8.54:1AAA
Accent4.75:1AA
Destructive6.65:1AA
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button4.37:1AA Large
Secondary button4.77:1AA
Muted text9.69:1AAA
Accent4.75:1AA
Destructive4.70:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.008 120.896);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.964 0.013 96.329);
  --muted-foreground: oklch(0.393 0.004 96.286);
  --popover: oklch(0.99 0.008 120.896);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.99 0.008 120.896);
  --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.567 0.118 125.057);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.553 0.092 96.564);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.542 0.141 140.19);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.435 0.171 28.755);
  --destructive-foreground: oklch(0.915 0.039 19.051);
  --ring: oklch(0.567 0.118 125.057);
  --chart-1: oklch(0.567 0.118 125.057);
  --chart-2: oklch(0.553 0.092 96.564);
  --chart-3: oklch(0.542 0.141 140.19);
  --chart-4: oklch(0.588 0.099 96.539);
  --chart-5: oklch(0.574 0.123 125.29);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.186 0.018 97.037);
  --muted-foreground: oklch(0.792 0.003 96.216);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --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.567 0.118 125.057);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.553 0.092 96.564);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.542 0.141 140.19);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.586 0.234 28.961);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.567 0.118 125.057);
  --chart-1: oklch(0.567 0.118 125.057);
  --chart-2: oklch(0.553 0.092 96.564);
  --chart-3: oklch(0.542 0.141 140.19);
  --chart-4: oklch(0.588 0.099 96.539);
  --chart-5: oklch(0.574 0.123 125.29);
}