Dirndl for shadcn/ui

Dirndl is a shadcn/ui theme built around a muted deep orange primary color (#5f4f35) with muted light orange accents (#e6e4e0). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep orange primary (#5f4f35) on a neutral background (#040301).

Color palette

TokenLightDark
Background
#ffffffwhite
#040301black
Foreground
#090601black
#faf8f5whitesmoke
Card
#ffffffwhite
#040301black
Card foreground
#090601black
#faf8f5whitesmoke
Popover
#ffffffwhite
#040301black
Popover foreground
#090601black
#faf8f5whitesmoke
Primary
#5f4f35darkolivegreen
#5f4f35darkolivegreen
Primary foreground
#ebe5dbantiquewhite
#ebe5dbantiquewhite
Secondary
#e6e4e0gainsboro
#353331darkslategray
Secondary foreground
#514c43darkslategray
#cecccalightgrey
Muted
#e9e6e2gainsboro
#1d1a16black
Muted foreground
#5e5e5edimgray
#a1a1a1darkgray
Accent
#e6e4e0gainsboro
#353331darkslategray
Accent foreground
#514c43darkslategray
#cecccalightgrey
Destructive
#9f1904darkred
#ea2406orangered
Destructive foreground
#fedcd7mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5f4f35darkolivegreen
#5f4f35darkolivegreen

Contrast

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

Light mode
Text on background20.22:1AAA
Text on card20.22:1AAA
Primary button6.33:1AA
Secondary button6.68:1AA
Muted text5.22:1AA
Accent6.68:1AA
Destructive6.28:1AA
Dark mode
Text on background19.45:1AAA
Text on card19.45:1AAA
Primary button6.33:1AA
Secondary button7.83:1AAA
Muted text6.69:1AA
Accent7.83:1AAA
Destructive4.42:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.124 0.018 88.542);
  --muted: oklch(0.927 0.006 79.922);
  --muted-foreground: oklch(0.483 0 180);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.124 0.018 88.542);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.124 0.018 88.542);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.436 0.044 79.065);
  --primary-foreground: oklch(0.923 0.015 79.9);
  --secondary: oklch(0.918 0.005 79.924);
  --secondary-foreground: oklch(0.418 0.017 79.798);
  --accent: oklch(0.918 0.005 79.924);
  --accent-foreground: oklch(0.418 0.017 79.798);
  --destructive: oklch(0.452 0.171 31.398);
  --destructive-foreground: oklch(0.922 0.038 28.198);
  --ring: oklch(0.436 0.044 79.065);
  --chart-1: oklch(0.436 0.044 79.065);
  --chart-2: oklch(0.918 0.005 79.924);
  --chart-3: oklch(0.918 0.005 79.924);
  --chart-4: oklch(0.941 0.004 79.927);
  --chart-5: oklch(0.439 0.048 78.87);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.097 0.011 86.48);
  --foreground: oklch(0.98 0.005 79.925);
  --muted: oklch(0.22 0.009 79.798);
  --muted-foreground: oklch(0.708 0 158.199);
  --popover: oklch(0.097 0.011 86.48);
  --popover-foreground: oklch(0.98 0.005 79.925);
  --card: oklch(0.097 0.011 86.48);
  --card-foreground: oklch(0.98 0.005 79.925);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.436 0.044 79.065);
  --primary-foreground: oklch(0.923 0.015 79.9);
  --secondary: oklch(0.323 0.004 79.911);
  --secondary-foreground: oklch(0.847 0.003 79.928);
  --accent: oklch(0.323 0.004 79.911);
  --accent-foreground: oklch(0.847 0.003 79.928);
  --destructive: oklch(0.6 0.23 31.052);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.436 0.044 79.065);
  --chart-1: oklch(0.436 0.044 79.065);
  --chart-2: oklch(0.323 0.004 79.911);
  --chart-3: oklch(0.323 0.004 79.911);
  --chart-4: oklch(0.353 0.004 79.911);
  --chart-5: oklch(0.439 0.048 78.87);
}