Port for shadcn/ui

Port is a shadcn/ui theme built around a green primary color (#72aa41) with violet accents (#7941aa). The light mode uses a neutral background (#fcfefb). Dark mode keeps the green primary (#72aa41) on a neutral background (#020302).

Color palette

TokenLightDark
Background
#fcfefbwhite
#020302black
Foreground
#0a1103black
#ffffffwhite
Card
#fafdf7mintcream
#050703black
Card foreground
#070d03black
#ffffffwhite
Popover
#fcfefbwhite
#020302black
Popover foreground
#0a1103black
#ffffffwhite
Primary
#72aa41olivedrab
#72aa41olivedrab
Primary foreground
#0f1608black
#0f1608black
Secondary
#7941aarebeccapurple
#7941aarebeccapurple
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e6e4e7gainsboro
#1a181bblack
Muted foreground
#554b5ddimgray
#aba2b4darkgray
Accent
#7941aarebeccapurple
#7941aarebeccapurple
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#c43012firebrick
#e03715orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#72aa41olivedrab
#72aa41olivedrab

Contrast

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

Light mode
Text on background18.91:1AAA
Text on card19.10:1AAA
Primary button6.62:1AA
Secondary button6.69:1AA
Muted text6.50:1AA
Accent6.69:1AA
Destructive5.56:1AA
Dark mode
Text on background20.60:1AAA
Text on card20.23:1AAA
Primary button6.62:1AA
Secondary button6.69:1AA
Muted text7.19:1AAA
Accent6.69:1AA
Destructive4.44:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.004 129.824);
  --foreground: oklch(0.165 0.032 129.877);
  --muted: oklch(0.921 0.004 309.737);
  --muted-foreground: oklch(0.429 0.033 309.036);
  --popover: oklch(0.995 0.004 129.824);
  --popover-foreground: oklch(0.165 0.032 129.877);
  --card: oklch(0.989 0.008 129.863);
  --card-foreground: oklch(0.147 0.027 128.659);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.677 0.15 132.819);
  --primary-foreground: oklch(0.189 0.029 131.433);
  --secondary: oklch(0.494 0.165 305.761);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.494 0.165 305.761);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.54 0.189 32.766);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.677 0.15 132.819);
  --chart-1: oklch(0.677 0.15 132.819);
  --chart-2: oklch(0.494 0.165 305.761);
  --chart-3: oklch(0.494 0.165 305.761);
  --chart-4: oklch(0.516 0.174 305.725);
  --chart-5: oklch(0.685 0.157 133.034);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.097 0.01 128.948);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.212 0.006 309.485);
  --muted-foreground: oklch(0.725 0.029 309.395);
  --popover: oklch(0.097 0.01 128.948);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.123 0.013 128.948);
  --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.677 0.15 132.819);
  --primary-foreground: oklch(0.189 0.029 131.433);
  --secondary: oklch(0.494 0.165 305.761);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.494 0.165 305.761);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.595 0.21 32.704);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.677 0.15 132.819);
  --chart-1: oklch(0.677 0.15 132.819);
  --chart-2: oklch(0.494 0.165 305.761);
  --chart-3: oklch(0.494 0.165 305.761);
  --chart-4: oklch(0.516 0.174 305.725);
  --chart-5: oklch(0.685 0.157 133.034);
}