Dragonfruit for shadcn/ui

Dragonfruit is a shadcn/ui theme built around a muted deep purple primary color (#562f4d) with muted light purple accents (#dcd5db). The light mode uses a neutral background (#fdf6fc). Dark mode keeps the muted deep purple primary (#562f4d) on a purple-tinted background (#0b040a).

Color palette

TokenLightDark
Background
#fdf6fcsnow
#0b040ablack
Foreground
#040103black
#ffffffwhite
Card
#fcf2falavenderblush
#0f060dblack
Card foreground
#000000black
#ffffffwhite
Popover
#fcf2falavenderblush
#0f060dblack
Popover foreground
#000000black
#ffffffwhite
Primary
#562f4ddarkslategray
#562f4ddarkslategray
Primary foreground
#e6d1e1gainsboro
#e6d1e1gainsboro
Secondary
#dcd5dbgainsboro
#1e151cblack
Secondary foreground
#453a43darkslategray
#c1a4bbsilver
Muted
#ebdbe8gainsboro
#241421black
Muted foreground
#5e5a5ddimgray
#a5a1a4darkgray
Accent
#dcd5dbgainsboro
#1e151cblack
Accent foreground
#453a43darkslategray
#c1a4bbsilver
Destructive
#b8240afirebrick
#f4482atomato
Destructive foreground
#fef7f5floralwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#562f4ddarkslategray
#562f4ddarkslategray

Contrast

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

Light mode
Text on background19.62:1AAA
Text on card19.26:1AAA
Primary button7.64:1AAA
Secondary button7.53:1AAA
Muted text5.09:1AA
Accent7.53:1AAA
Destructive6.01:1AA
Dark mode
Text on background20.24:1AAA
Text on card19.99:1AAA
Primary button7.64:1AAA
Secondary button7.89:1AAA
Muted text6.88:1AA
Accent7.89:1AAA
Destructive3.61:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.01 332.776);
  --foreground: oklch(0.085 0.02 333.547);
  --muted: oklch(0.907 0.025 333.044);
  --muted-foreground: oklch(0.472 0.007 332.83);
  --popover: oklch(0.972 0.015 332.857);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.972 0.015 332.857);
  --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.366 0.071 335.416);
  --primary-foreground: oklch(0.882 0.031 333.159);
  --secondary: oklch(0.881 0.01 332.8);
  --secondary-foreground: oklch(0.364 0.022 333.514);
  --accent: oklch(0.881 0.01 332.8);
  --accent-foreground: oklch(0.364 0.022 333.514);
  --destructive: oklch(0.508 0.187 31.873);
  --destructive-foreground: oklch(0.981 0.009 29.498);
  --ring: oklch(0.366 0.071 335.416);
  --chart-1: oklch(0.366 0.071 335.416);
  --chart-2: oklch(0.881 0.01 332.8);
  --chart-3: oklch(0.881 0.01 332.8);
  --chart-4: oklch(0.905 0.008 332.759);
  --chart-5: oklch(0.365 0.078 335.683);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.02 333.385);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.218 0.036 334.981);
  --muted-foreground: oklch(0.714 0.006 332.744);
  --popover: oklch(0.139 0.023 334.352);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.139 0.023 334.352);
  --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.366 0.071 335.416);
  --primary-foreground: oklch(0.882 0.031 333.159);
  --secondary: oklch(0.21 0.021 334.094);
  --secondary-foreground: oklch(0.751 0.046 333.535);
  --accent: oklch(0.21 0.021 334.094);
  --accent-foreground: oklch(0.751 0.046 333.535);
  --destructive: oklch(0.646 0.213 32.371);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.366 0.071 335.416);
  --chart-1: oklch(0.366 0.071 335.416);
  --chart-2: oklch(0.21 0.021 334.094);
  --chart-3: oklch(0.21 0.021 334.094);
  --chart-4: oklch(0.241 0.026 334.221);
  --chart-5: oklch(0.365 0.078 335.683);
}