Worm for shadcn/ui

Worm is a shadcn/ui theme built around a purple primary color (#d9a0d2) with green accents (#a0d9a8). The light mode uses a neutral background (#fdfcfd). Dark mode keeps the purple primary (#d9a0d2) on a purple-tinted background (#0c030b).

Color palette

TokenLightDark
Background
#fdfcfdwhite
#0c030bblack
Foreground
#000000black
#faf5f9whitesmoke
Card
#fcf8fbsnow
#10040fblack
Card foreground
#000000black
#fcf8fbsnow
Popover
#fdfcfdwhite
#0c030bblack
Popover foreground
#000000black
#faf5f9whitesmoke
Primary
#d9a0d2plum
#d9a0d2plum
Primary foreground
#33142fdarkslategray
#33142fdarkslategray
Secondary
#a0d9a8lightgreen
#a0d9a8lightgreen
Secondary foreground
#143318darkgreen
#143318darkgreen
Muted
#eaf1ebwhitesmoke
#0e150fblack
Muted foreground
#4f6952dimgray
#96b09adarkseagreen
Accent
#a0d9a8lightgreen
#a0d9a8lightgreen
Accent foreground
#143318darkgreen
#143318darkgreen
Destructive
#720303maroon
#f40606red
Destructive foreground
#fdaaaalightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d9a0d2plum
#d9a0d2plum

Contrast

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

Light mode
Text on background20.47:1AAA
Text on card19.95:1AAA
Primary button7.74:1AAA
Secondary button8.57:1AAA
Muted text5.24:1AA
Accent8.57:1AAA
Destructive6.63:1AA
Dark mode
Text on background18.84:1AAA
Text on card19.05:1AAA
Primary button7.74:1AAA
Secondary button8.57:1AAA
Muted text7.89:1AAA
Accent8.57:1AAA
Destructive4.31:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 329.72);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.95 0.011 149.538);
  --muted-foreground: oklch(0.492 0.047 148.433);
  --popover: oklch(0.991 0.003 329.72);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.983 0.006 329.757);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.776 0.094 331.082);
  --primary-foreground: oklch(0.251 0.064 332.561);
  --secondary: oklch(0.834 0.09 148.237);
  --secondary-foreground: oklch(0.29 0.06 146.61);
  --accent: oklch(0.834 0.09 148.237);
  --accent-foreground: oklch(0.29 0.06 146.61);
  --destructive: oklch(0.349 0.141 28.815);
  --destructive-foreground: oklch(0.819 0.097 19.373);
  --ring: oklch(0.776 0.094 331.082);
  --chart-1: oklch(0.776 0.094 331.082);
  --chart-2: oklch(0.834 0.09 148.237);
  --chart-3: oklch(0.834 0.09 148.237);
  --chart-4: oklch(0.852 0.08 148.449);
  --chart-5: oklch(0.775 0.1 331.175);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.029 331.204);
  --foreground: oklch(0.975 0.008 329.789);
  --muted: oklch(0.188 0.017 148.53);
  --muted-foreground: oklch(0.731 0.043 148.936);
  --popover: oklch(0.123 0.029 331.204);
  --popover-foreground: oklch(0.975 0.008 329.789);
  --card: oklch(0.137 0.033 331.796);
  --card-foreground: oklch(0.983 0.006 329.753);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.776 0.094 331.082);
  --primary-foreground: oklch(0.251 0.064 332.561);
  --secondary: oklch(0.834 0.09 148.237);
  --secondary-foreground: oklch(0.29 0.06 146.61);
  --accent: oklch(0.834 0.09 148.237);
  --accent-foreground: oklch(0.29 0.06 146.61);
  --destructive: oklch(0.608 0.248 29.063);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.776 0.094 331.082);
  --chart-1: oklch(0.776 0.094 331.082);
  --chart-2: oklch(0.834 0.09 148.237);
  --chart-3: oklch(0.834 0.09 148.237);
  --chart-4: oklch(0.852 0.08 148.449);
  --chart-5: oklch(0.775 0.1 331.175);
}