Dust for shadcn/ui

Dust is a shadcn/ui theme built around a purple primary color (#cf2acf) with muted light purple accents (#d6c2d6). The light mode uses a neutral background (#fcf7fc). Dark mode keeps the purple primary (#cf2acf) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcf7fcsnow
#000000black
Foreground
#150415black
#fdfcfdwhite
Card
#fbf4fbghostwhite
#030303black
Card foreground
#110311black
#ffffffwhite
Popover
#fcf7fcsnow
#000000black
Popover foreground
#150415black
#fdfcfdwhite
Primary
#cf2acfmediumorchid
#cf2acfmediumorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#e4dde4gainsboro
#2b1d2bdarkslategray
Secondary foreground
#503f50darkslategray
#caafcasilver
Muted
#e1d0e1gainsboro
#2f1e2fdarkslategray
Muted foreground
#483748darkslategray
#c8b7c8silver
Accent
#d6c2d6thistle
#3d243ddarkslategray
Accent foreground
#3d293ddarkslategray
#d7bcd7thistle
Destructive
#b34b0fsienna
#ee752ftomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#cf2acfmediumorchid
#cf2acfmediumorchid

Contrast

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

Light mode
Text on background18.79:1AAA
Text on card18.56:1AAA
Primary button4.27:1AA Large
Secondary button7.25:1AAA
Muted text7.49:1AAA
Accent7.93:1AAA
Destructive5.33:1AA
Dark mode
Text on background20.51:1AAA
Text on card20.67:1AAA
Primary button4.27:1AA Large
Secondary button8.02:1AAA
Muted text8.23:1AAA
Accent7.95:1AAA
Destructive7.24:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.008 325.639);
  --foreground: oklch(0.152 0.046 327.564);
  --muted: oklch(0.877 0.029 325.823);
  --muted-foreground: oklch(0.363 0.036 326.282);
  --popover: oklch(0.983 0.008 325.639);
  --popover-foreground: oklch(0.152 0.046 327.564);
  --card: oklch(0.974 0.012 325.672);
  --card-foreground: oklch(0.138 0.041 327.504);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.615 0.257 328.159);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.905 0.013 325.681);
  --secondary-foreground: oklch(0.392 0.036 326.242);
  --accent: oklch(0.837 0.034 325.876);
  --accent-foreground: oklch(0.313 0.043 326.544);
  --destructive: oklch(0.542 0.15 44.348);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.615 0.257 328.159);
  --chart-1: oklch(0.615 0.257 328.159);
  --chart-2: oklch(0.905 0.013 325.681);
  --chart-3: oklch(0.837 0.034 325.876);
  --chart-4: oklch(0.929 0.009 325.652);
  --chart-5: oklch(0.62 0.264 328.196);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.002 325.591);
  --muted: oklch(0.263 0.039 326.615);
  --muted-foreground: oklch(0.798 0.029 325.849);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.992 0.002 325.591);
  --card: oklch(0.092 0 180);
  --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.615 0.257 328.159);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.253 0.034 326.511);
  --secondary-foreground: oklch(0.786 0.047 326.016);
  --accent: oklch(0.302 0.056 326.847);
  --accent-foreground: oklch(0.826 0.049 326.01);
  --destructive: oklch(0.694 0.169 46.957);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.615 0.257 328.159);
  --chart-1: oklch(0.615 0.257 328.159);
  --chart-2: oklch(0.253 0.034 326.511);
  --chart-3: oklch(0.302 0.056 326.847);
  --chart-4: oklch(0.283 0.039 326.556);
  --chart-5: oklch(0.62 0.264 328.196);
}