Strudel for shadcn/ui

Strudel is a shadcn/ui theme built around a muted purple primary color (#5b4859) with muted cyan accents (#48595b). The light mode uses a neutral background (#fdf7fc). Dark mode keeps the muted purple primary (#5b4859) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdf7fcsnow
#000000black
Foreground
#080207black
#f8f6f8whitesmoke
Card
#fbf3fbghostwhite
#030303black
Card foreground
#040104black
#fbf9fasnow
Popover
#fdf7fcsnow
#000000black
Popover foreground
#080207black
#f8f6f8whitesmoke
Primary
#5b4859dimgray
#5b4859dimgray
Primary foreground
#ede8edlavender
#ede8edlavender
Secondary
#595b48darkolivegreen
#595b48darkolivegreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e8e9ddgainsboro
#212216black
Muted foreground
#60634bdarkolivegreen
#b2b49cdarkgray
Accent
#48595bdarkslategray
#48595bdarkslategray
Accent foreground
#e8ededlavender
#e8ededlavender
Destructive
#d5520bchocolate
#f36012orangered
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5b4859dimgray
#5b4859dimgray

Contrast

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

Light mode
Text on background19.47:1AAA
Text on card19.15:1AAA
Primary button6.90:1AA
Secondary button6.92:1AA
Muted text5.06:1AA
Accent6.19:1AA
Destructive4.16:1AA Large
Dark mode
Text on background19.52:1AAA
Text on card19.72:1AAA
Primary button6.90:1AA
Secondary button6.92:1AA
Muted text7.57:1AAA
Accent6.19:1AA
Destructive6.48:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.008 328.687);
  --foreground: oklch(0.108 0.024 329.854);
  --muted: oklch(0.93 0.016 111.345);
  --muted-foreground: oklch(0.49 0.037 112.411);
  --popover: oklch(0.982 0.008 328.687);
  --popover-foreground: oklch(0.108 0.024 329.854);
  --card: oklch(0.973 0.013 328.736);
  --card-foreground: oklch(0.086 0.019 329.854);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.428 0.038 329.536);
  --primary-foreground: oklch(0.937 0.008 328.685);
  --secondary: oklch(0.465 0.031 112.226);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.451 0.022 204.716);
  --accent-foreground: oklch(0.942 0.005 204.951);
  --destructive: oklch(0.605 0.179 41.869);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.428 0.038 329.536);
  --chart-1: oklch(0.428 0.038 329.536);
  --chart-2: oklch(0.465 0.031 112.226);
  --chart-3: oklch(0.451 0.022 204.716);
  --chart-4: oklch(0.495 0.033 112.239);
  --chart-5: oklch(0.426 0.048 329.762);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.976 0.003 328.631);
  --muted: oklch(0.247 0.022 112.667);
  --muted-foreground: oklch(0.763 0.034 111.834);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.976 0.003 328.631);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.984 0.002 328.618);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.428 0.038 329.536);
  --primary-foreground: oklch(0.937 0.008 328.685);
  --secondary: oklch(0.465 0.031 112.226);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.451 0.022 204.716);
  --accent-foreground: oklch(0.942 0.005 204.951);
  --destructive: oklch(0.67 0.195 42.275);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.428 0.038 329.536);
  --chart-1: oklch(0.428 0.038 329.536);
  --chart-2: oklch(0.465 0.031 112.226);
  --chart-3: oklch(0.451 0.022 204.716);
  --chart-4: oklch(0.495 0.033 112.239);
  --chart-5: oklch(0.426 0.048 329.762);
}