PLFX for shadcn/ui

PLFX is a shadcn/ui theme built around a blue primary color (#3b517d) with deep teal accents (#1d6262). The light mode uses a neutral background (#fbfcfd). Dark mode keeps the blue primary (#3b517d) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfcfdwhite
#000000black
Foreground
#000000black
#f9fafbghostwhite
Card
#f8f9fcghostwhite
#030303black
Card foreground
#000000black
#fcfcfdwhite
Popover
#fbfcfdwhite
#000000black
Popover foreground
#000000black
#f9fafbghostwhite
Primary
#3b517ddarkslateblue
#3b517ddarkslateblue
Primary foreground
#f1f4f8whitesmoke
#f1f4f8whitesmoke
Secondary
#c9cd92tan
#c9cd92tan
Secondary foreground
#000000black
#000000black
Muted
#e5e9f0lavender
#0f131ablack
Muted foreground
#4d4e51darkslategray
#aeafb2darkgray
Accent
#1d6262darkslategray
#1d6262darkslategray
Accent foreground
#393a3cdarkslategray
#b6b7b9silver
Destructive
#b42808firebrick
#e0320borangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e2e3e4gainsboro
#1d1e20black
Input
#e2e3e4gainsboro
#1d1e20black
Ring
#3b517ddarkslateblue
#3b517ddarkslateblue

Contrast

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

Light mode
Text on background20.48:1AAA
Text on card19.97:1AAA
Primary button7.18:1AAA
Secondary button12.63:1AAA
Muted text6.82:1AA
Accent1.61:1Fail
Destructive6.45:1AA
Dark mode
Text on background20.09:1AAA
Text on card20.16:1AAA
Primary button7.18:1AAA
Secondary button12.63:1AAA
Muted text8.50:1AAA
Accent3.51:1AA Large
Destructive4.53:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 264.545);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.933 0.01 264.514);
  --muted-foreground: oklch(0.425 0.006 264.506);
  --popover: oklch(0.991 0.002 264.545);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.983 0.004 264.54);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.914 0.002 264.544);
  --input: oklch(0.914 0.002 264.544);
  --primary: oklch(0.437 0.078 263.295);
  --primary-foreground: oklch(0.965 0.007 264.528);
  --secondary: oklch(0.831 0.078 111.228);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.454 0.067 195.06);
  --accent-foreground: oklch(0.348 0.004 264.509);
  --destructive: oklch(0.504 0.18 32.995);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.437 0.078 263.295);
  --chart-1: oklch(0.437 0.078 263.295);
  --chart-2: oklch(0.831 0.078 111.228);
  --chart-3: oklch(0.454 0.067 195.06);
  --chart-4: oklch(0.847 0.071 111.042);
  --chart-5: oklch(0.435 0.085 263.158);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.984 0.002 264.544);
  --muted: oklch(0.185 0.016 264.083);
  --muted-foreground: oklch(0.754 0.005 264.531);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.984 0.002 264.544);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.992 0.001 264.548);
  --border: oklch(0.236 0.003 264.502);
  --input: oklch(0.236 0.003 264.502);
  --primary: oklch(0.437 0.078 263.295);
  --primary-foreground: oklch(0.965 0.007 264.528);
  --secondary: oklch(0.831 0.078 111.228);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.454 0.067 195.06);
  --accent-foreground: oklch(0.78 0.003 264.54);
  --destructive: oklch(0.591 0.214 32.805);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.437 0.078 263.295);
  --chart-1: oklch(0.437 0.078 263.295);
  --chart-2: oklch(0.831 0.078 111.228);
  --chart-3: oklch(0.454 0.067 195.06);
  --chart-4: oklch(0.847 0.071 111.042);
  --chart-5: oklch(0.435 0.085 263.158);
}