Portly for shadcn/ui

Portly is a shadcn/ui theme built around a near-white primary color (#f7f9fc) with near-white accents (#fcfaf7). The light mode uses a neutral background (#f7f9fc). Dark mode keeps the near-white primary (#f7f9fc) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f7f9fcghostwhite
#000000black
Foreground
#030b16black
#f6f7f9whitesmoke
Card
#f7f9fcghostwhite
#000000black
Card foreground
#030b16black
#f6f7f9whitesmoke
Popover
#f7f9fcghostwhite
#000000black
Popover foreground
#030b16black
#f6f7f9whitesmoke
Primary
#f7f9fcghostwhite
#f7f9fcghostwhite
Primary foreground
#32568fdarkslateblue
#32568fdarkslateblue
Secondary
#fcfaf7snow
#fcfaf7snow
Secondary foreground
#443318darkolivegreen
#443318darkolivegreen
Muted
#e8e0d4gainsboro
#2b2317black
Muted foreground
#4f4f4fdarkslategray
#b0b0b0darkgray
Accent
#fcfaf7snow
#fcfaf7snow
Accent foreground
#443318darkolivegreen
#443318darkolivegreen
Destructive
#740a06maroon
#f53f38tomato
Destructive foreground
#fbb4b1lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f7f9fcghostwhite
#f7f9fcghostwhite

Contrast

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

Light mode
Text on background18.78:1AAA
Text on card18.78:1AAA
Primary button6.97:1AA
Secondary button11.67:1AAA
Muted text6.26:1AA
Accent11.67:1AAA
Destructive6.84:1AA
Dark mode
Text on background19.59:1AAA
Text on card19.59:1AAA
Primary button6.97:1AA
Secondary button11.67:1AAA
Muted text7.11:1AAA
Accent11.67:1AAA
Destructive3.73:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.005 259.939);
  --foreground: oklch(0.146 0.03 254.553);
  --muted: oklch(0.91 0.018 79.886);
  --muted-foreground: oklch(0.428 0 180);
  --popover: oklch(0.982 0.005 259.939);
  --popover-foreground: oklch(0.146 0.03 254.553);
  --card: oklch(0.982 0.005 259.939);
  --card-foreground: oklch(0.146 0.03 254.553);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.983 0.004 259.939);
  --primary-foreground: oklch(0.456 0.103 259.491);
  --secondary: oklch(0.987 0.004 79.926);
  --secondary-foreground: oklch(0.334 0.048 77.784);
  --accent: oklch(0.987 0.004 79.926);
  --accent-foreground: oklch(0.334 0.048 77.784);
  --destructive: oklch(0.357 0.139 29.064);
  --destructive-foreground: oklch(0.835 0.083 21.216);
  --ring: oklch(0.983 0.004 259.939);
  --chart-1: oklch(0.983 0.004 259.939);
  --chart-2: oklch(0.987 0.004 79.926);
  --chart-3: oklch(0.987 0.004 79.926);
  --chart-4: oklch(1.006 0.002 259.936);
  --chart-5: oklch(0.982 0.005 259.939);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.976 0.003 259.937);
  --muted: oklch(0.263 0.024 79.233);
  --muted-foreground: oklch(0.757 0 180);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.976 0.003 259.937);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.976 0.003 259.937);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.983 0.004 259.939);
  --primary-foreground: oklch(0.456 0.103 259.491);
  --secondary: oklch(0.987 0.004 79.926);
  --secondary-foreground: oklch(0.334 0.048 77.784);
  --accent: oklch(0.987 0.004 79.926);
  --accent-foreground: oklch(0.334 0.048 77.784);
  --destructive: oklch(0.64 0.219 27.44);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.983 0.004 259.939);
  --chart-1: oklch(0.983 0.004 259.939);
  --chart-2: oklch(0.987 0.004 79.926);
  --chart-3: oklch(0.987 0.004 79.926);
  --chart-4: oklch(1.006 0.002 259.936);
  --chart-5: oklch(0.982 0.005 259.939);
}