Dirty for shadcn/ui

Dirty is a shadcn/ui theme built around a muted indigo primary color (#9395a9) with muted yellow accents (#a9a793). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the muted indigo primary (#9395a9) on a neutral background (#010204).

Color palette

TokenLightDark
Background
#f8f8fcghostwhite
#010204black
Foreground
#010104black
#ffffffwhite
Card
#f8f8fcghostwhite
#010204black
Card foreground
#010104black
#ffffffwhite
Popover
#f8f8fcghostwhite
#010204black
Popover foreground
#010104black
#ffffffwhite
Primary
#9395a9darkgray
#9395a9darkgray
Primary foreground
#050506black
#050506black
Secondary
#a9a793darkgray
#a9a793darkgray
Secondary foreground
#060605black
#060605black
Muted
#e1e0d0gainsboro
#2f2e1edarkslategray
Muted foreground
#686864dimgray
#9b9b97darkgray
Accent
#a9a793darkgray
#a9a793darkgray
Accent foreground
#060605black
#060605black
Destructive
#d03f01orangered
#fe5106orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9395a9darkgray
#9395a9darkgray

Contrast

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

Light mode
Text on background19.64:1AAA
Text on card19.64:1AAA
Primary button6.89:1AA
Secondary button8.35:1AAA
Muted text4.20:1AA Large
Accent8.35:1AAA
Destructive4.77:1AA
Dark mode
Text on background20.78:1AAA
Text on card20.78:1AAA
Primary button6.89:1AA
Secondary button8.35:1AAA
Muted text4.94:1AA
Accent8.35:1AAA
Destructive3.29:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.006 283.003);
  --foreground: oklch(0.075 0.018 276.118);
  --muted: oklch(0.903 0.021 103.49);
  --muted-foreground: oklch(0.516 0.006 103.297);
  --popover: oklch(0.98 0.006 283.003);
  --popover-foreground: oklch(0.075 0.018 276.118);
  --card: oklch(0.98 0.006 283.003);
  --card-foreground: oklch(0.075 0.018 276.118);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.675 0.029 282.341);
  --primary-foreground: oklch(0.113 0.004 282.334);
  --secondary: oklch(0.725 0.028 103.73);
  --secondary-foreground: oklch(0.119 0.003 103.787);
  --accent: oklch(0.725 0.028 103.73);
  --accent-foreground: oklch(0.119 0.003 103.787);
  --destructive: oklch(0.575 0.19 37.43);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.675 0.029 282.341);
  --chart-1: oklch(0.675 0.029 282.341);
  --chart-2: oklch(0.725 0.028 103.73);
  --chart-3: oklch(0.725 0.028 103.73);
  --chart-4: oklch(0.748 0.026 103.663);
  --chart-5: oklch(0.668 0.037 282.106);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.08 0.012 279.042);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.296 0.027 104.466);
  --muted-foreground: oklch(0.688 0.005 103.24);
  --popover: oklch(0.08 0.012 279.042);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.08 0.012 279.042);
  --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.675 0.029 282.341);
  --primary-foreground: oklch(0.113 0.004 282.334);
  --secondary: oklch(0.725 0.028 103.73);
  --secondary-foreground: oklch(0.119 0.003 103.787);
  --accent: oklch(0.725 0.028 103.73);
  --accent-foreground: oklch(0.119 0.003 103.787);
  --destructive: oklch(0.669 0.219 37.522);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.675 0.029 282.341);
  --chart-1: oklch(0.675 0.029 282.341);
  --chart-2: oklch(0.725 0.028 103.73);
  --chart-3: oklch(0.725 0.028 103.73);
  --chart-4: oklch(0.748 0.026 103.663);
  --chart-5: oklch(0.668 0.037 282.106);
}