Posh for shadcn/ui

Posh is a shadcn/ui theme built around a muted purple primary color (#786472) with muted cyan accents (#647278). The light mode uses a neutral background (#fefbfd). Dark mode keeps the muted purple primary (#786472) on a neutral background (#070406).

Color palette

TokenLightDark
Background
#fefbfdsnow
#070406black
Foreground
#000000black
#fbf9fasnow
Card
#fdf7fbsnow
#0a0509black
Card foreground
#000000black
#fdfcfdwhite
Popover
#fefbfdsnow
#070406black
Popover foreground
#000000black
#fbf9fasnow
Primary
#786472dimgray
#786472dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#727864dimgray
#727864dimgray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e6e7e4gainsboro
#1a1b18black
Muted foreground
#494b44darkslategray
#b9bbb4silver
Accent
#647278dimgray
#647278dimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#983410saddlebrown
#e85a26chocolate
Destructive foreground
#fce6dfmistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#786472dimgray
#786472dimgray

Contrast

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

Light mode
Text on background20.44:1AAA
Text on card19.89:1AAA
Primary button5.45:1AA
Secondary button4.59:1AA
Muted text7.14:1AAA
Accent4.96:1AA
Destructive6.15:1AA
Dark mode
Text on background19.51:1AAA
Text on card19.73:1AAA
Primary button5.45:1AA
Secondary button4.59:1AA
Muted text8.89:1AAA
Accent4.96:1AA
Destructive3.54:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.004 334.593);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.927 0.005 118.658);
  --muted-foreground: oklch(0.409 0.012 119.076);
  --popover: oklch(0.991 0.004 334.593);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.982 0.007 334.66);
  --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.526 0.033 335.59);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.561 0.03 119.514);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.543 0.019 221.681);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.467 0.141 38.139);
  --destructive-foreground: oklch(0.941 0.026 41.118);
  --ring: oklch(0.526 0.033 335.59);
  --chart-1: oklch(0.526 0.033 335.59);
  --chart-2: oklch(0.561 0.03 119.514);
  --chart-3: oklch(0.543 0.019 221.681);
  --chart-4: oklch(0.588 0.032 119.52);
  --chart-5: oklch(0.524 0.044 335.938);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.111 0.012 334.871);
  --foreground: oklch(0.984 0.003 334.574);
  --muted: oklch(0.221 0.007 119.116);
  --muted-foreground: oklch(0.789 0.01 118.791);
  --popover: oklch(0.111 0.012 334.871);
  --popover-foreground: oklch(0.984 0.003 334.574);
  --card: oklch(0.128 0.013 334.871);
  --card-foreground: oklch(0.992 0.001 334.551);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.526 0.033 335.59);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.561 0.03 119.514);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.543 0.019 221.681);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.647 0.187 38.663);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.526 0.033 335.59);
  --chart-1: oklch(0.526 0.033 335.59);
  --chart-2: oklch(0.561 0.03 119.514);
  --chart-3: oklch(0.543 0.019 221.681);
  --chart-4: oklch(0.588 0.032 119.52);
  --chart-5: oklch(0.524 0.044 335.938);
}