Dud for shadcn/ui

Dud is a shadcn/ui theme built around a muted deep violet primary color (#322c3f) with muted deep green accents (#393f2c). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep violet primary (#322c3f) on a neutral background (#020104).

Color palette

TokenLightDark
Background
#ffffffwhite
#020104black
Foreground
#0a0514black
#f9f8fcghostwhite
Card
#fcfcfcsnow
#040308black
Card foreground
#080410black
#fcfcfdwhite
Popover
#ffffffwhite
#020104black
Popover foreground
#0a0514black
#f9f8fcghostwhite
Primary
#322c3fdarkslategray
#322c3fdarkslategray
Primary foreground
#cbc6d7thistle
#cbc6d7thistle
Secondary
#393f2cdarkslategray
#393f2cdarkslategray
Secondary foreground
#d2d7c6lightgrey
#d2d7c6lightgrey
Muted
#f4f7eewhitesmoke
#0e1108black
Muted foreground
#434540darkslategray
#bebfbasilver
Accent
#393f2cdarkslategray
#393f2cdarkslategray
Accent foreground
#d2d7c6lightgrey
#d2d7c6lightgrey
Destructive
#b80e05firebrick
#f9170bred
Destructive foreground
#fff1f0seashell
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#322c3fdarkslategray
#322c3fdarkslategray

Contrast

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

Light mode
Text on background20.10:1AAA
Text on card19.84:1AAA
Primary button8.04:1AAA
Secondary button7.41:1AAA
Muted text8.93:1AAA
Accent7.41:1AAA
Destructive6.15:1AA
Dark mode
Text on background19.66:1AAA
Text on card20.08:1AAA
Primary button8.04:1AAA
Secondary button7.41:1AAA
Muted text10.28:1AAA
Accent7.41:1AAA
Destructive4.07:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.136 0.033 298.11);
  --muted: oklch(0.97 0.012 120.968);
  --muted-foreground: oklch(0.387 0.009 121.155);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.136 0.033 298.11);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.126 0.029 299.715);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.308 0.035 298.854);
  --primary-foreground: oklch(0.836 0.025 300.28);
  --secondary: oklch(0.357 0.033 122.338);
  --secondary-foreground: oklch(0.871 0.024 121.229);
  --accent: oklch(0.357 0.033 122.338);
  --accent-foreground: oklch(0.871 0.024 121.229);
  --destructive: oklch(0.496 0.198 29.59);
  --destructive-foreground: oklch(0.968 0.015 21.088);
  --ring: oklch(0.308 0.035 298.854);
  --chart-1: oklch(0.308 0.035 298.854);
  --chart-2: oklch(0.357 0.033 122.338);
  --chart-3: oklch(0.357 0.033 122.338);
  --chart-4: oklch(0.389 0.037 122.377);
  --chart-5: oklch(0.304 0.041 298.488);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.081 0.015 301.099);
  --foreground: oklch(0.982 0.004 300.693);
  --muted: oklch(0.172 0.018 122.429);
  --muted-foreground: oklch(0.803 0.008 120.923);
  --popover: oklch(0.081 0.015 301.099);
  --popover-foreground: oklch(0.982 0.004 300.693);
  --card: oklch(0.101 0.019 301.099);
  --card-foreground: oklch(0.991 0.002 300.731);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.308 0.035 298.854);
  --primary-foreground: oklch(0.836 0.025 300.28);
  --secondary: oklch(0.357 0.033 122.338);
  --secondary-foreground: oklch(0.871 0.024 121.229);
  --accent: oklch(0.357 0.033 122.338);
  --accent-foreground: oklch(0.871 0.024 121.229);
  --destructive: oklch(0.622 0.248 29.498);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.308 0.035 298.854);
  --chart-1: oklch(0.308 0.035 298.854);
  --chart-2: oklch(0.357 0.033 122.338);
  --chart-3: oklch(0.357 0.033 122.338);
  --chart-4: oklch(0.389 0.037 122.377);
  --chart-5: oklch(0.304 0.041 298.488);
}