Swamp for shadcn/ui

Swamp is a shadcn/ui theme built around a vivid purple primary color (#f288d0) with muted light purple accents (#d3b1c8). The light mode uses a neutral background (#fefbfd). Dark mode keeps the vivid purple primary (#f288d0) on a neutral background (#070306).

Color palette

TokenLightDark
Background
#fefbfdsnow
#070306black
Foreground
#0c0309black
#fdfcfdwhite
Card
#fefbfdsnow
#070306black
Card foreground
#0c0309black
#fdfcfdwhite
Popover
#fefbfdsnow
#070306black
Popover foreground
#0c0309black
#fdfcfdwhite
Primary
#f288d0violet
#f288d0violet
Primary foreground
#40072emidnightblue
#40072emidnightblue
Secondary
#e2d5degainsboro
#272626darkslategray
Secondary foreground
#4f3647darkslategray
#c0bfbfsilver
Muted
#eed8e7gainsboro
#271120black
Muted foreground
#725a6adimgray
#a58d9drosybrown
Accent
#d3b1c8thistle
#443b41darkslategray
Accent foreground
#341d2ddarkslategray
#dbd6dagainsboro
Destructive
#9a130edarkred
#ed4540tomato
Destructive foreground
#fcdfdemistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f288d0violet
#f288d0violet

Contrast

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

Light mode
Text on background19.76:1AAA
Text on card19.76:1AAA
Primary button7.12:1AAA
Secondary button7.56:1AAA
Muted text4.60:1AA
Accent7.99:1AAA
Destructive6.77:1AA
Dark mode
Text on background20.00:1AAA
Text on card20.00:1AAA
Primary button7.12:1AAA
Secondary button8.24:1AAA
Muted text5.80:1AA
Accent7.48:1AAA
Destructive3.78:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.005 336.649);
  --foreground: oklch(0.122 0.027 337.43);
  --muted: oklch(0.904 0.031 337.217);
  --muted-foreground: oklch(0.497 0.041 338.074);
  --popover: oklch(0.991 0.005 336.649);
  --popover-foreground: oklch(0.122 0.027 337.43);
  --card: oklch(0.991 0.005 336.649);
  --card-foreground: oklch(0.122 0.027 337.43);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.762 0.155 340.222);
  --primary-foreground: oklch(0.257 0.096 344.253);
  --secondary: oklch(0.885 0.019 336.981);
  --secondary-foreground: oklch(0.367 0.045 338.793);
  --accent: oklch(0.796 0.05 337.747);
  --accent-foreground: oklch(0.269 0.044 339.503);
  --destructive: oklch(0.439 0.168 28.806);
  --destructive-foreground: oklch(0.928 0.032 20.106);
  --ring: oklch(0.762 0.155 340.222);
  --chart-1: oklch(0.762 0.155 340.222);
  --chart-2: oklch(0.885 0.019 336.981);
  --chart-3: oklch(0.796 0.05 337.747);
  --chart-4: oklch(0.91 0.015 336.88);
  --chart-5: oklch(0.762 0.16 340.354);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.11 0.014 336.85);
  --foreground: oklch(0.992 0.002 336.604);
  --muted: oklch(0.217 0.044 340.2);
  --muted-foreground: oklch(0.67 0.038 337.616);
  --popover: oklch(0.11 0.014 336.85);
  --popover-foreground: oklch(0.992 0.002 336.604);
  --card: oklch(0.11 0.014 336.85);
  --card-foreground: oklch(0.992 0.002 336.604);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.762 0.155 340.222);
  --primary-foreground: oklch(0.257 0.096 344.253);
  --secondary: oklch(0.269 0.001 336.666);
  --secondary-foreground: oklch(0.805 0.002 336.605);
  --accent: oklch(0.365 0.016 337.389);
  --accent-foreground: oklch(0.882 0.008 336.728);
  --destructive: oklch(0.635 0.205 26.834);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.762 0.155 340.222);
  --chart-1: oklch(0.762 0.155 340.222);
  --chart-2: oklch(0.269 0.001 336.666);
  --chart-3: oklch(0.365 0.016 337.389);
  --chart-4: oklch(0.3 0.002 336.671);
  --chart-5: oklch(0.762 0.16 340.354);
}