Cow for shadcn/ui

Cow is a shadcn/ui theme built around a purple primary color (#e396dd) with muted light red accents (#d7d0d0). The light mode uses a neutral background (#fdf7fc). Dark mode keeps the purple primary (#e396dd) on a purple-tinted background (#0a050a).

Color palette

TokenLightDark
Background
#fdf7fcsnow
#0a050ablack
Foreground
#090108black
#ffffffwhite
Card
#fbf3fbghostwhite
#0d070dblack
Card foreground
#040104black
#ffffffwhite
Popover
#fbf3fbghostwhite
#0d070dblack
Popover foreground
#040104black
#ffffffwhite
Primary
#e396ddplum
#e396ddplum
Primary foreground
#380f35midnightblue
#380f35midnightblue
Secondary
#e8e8e8lavender
#1f191eblack
Secondary foreground
#4f4f4fdarkslategray
#bcaebbsilver
Muted
#e4ddddgainsboro
#221b22black
Muted foreground
#676565dimgray
#9a989adarkgray
Accent
#d7d0d0lightgrey
#3c2a3bdarkslategray
Accent foreground
#3f3636darkslategray
#d5c3d4thistle
Destructive
#973602saddlebrown
#fc7b36coral
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e396ddplum
#e396ddplum

Contrast

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

Light mode
Text on background19.51:1AAA
Text on card19.14:1AAA
Primary button7.52:1AAA
Secondary button6.68:1AA
Muted text4.31:1AA Large
Accent7.72:1AAA
Destructive7.38:1AAA
Dark mode
Text on background20.19:1AAA
Text on card19.92:1AAA
Primary button7.52:1AAA
Secondary button8.13:1AAA
Muted text5.87:1AA
Accent7.94:1AAA
Destructive8.03:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.009 328.158);
  --foreground: oklch(0.106 0.032 329.737);
  --muted: oklch(0.903 0.008 17.305);
  --muted-foreground: oklch(0.509 0.003 17.241);
  --popover: oklch(0.973 0.013 328.206);
  --popover-foreground: oklch(0.084 0.025 329.737);
  --card: oklch(0.973 0.013 328.206);
  --card-foreground: oklch(0.084 0.025 329.737);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.773 0.129 329.677);
  --primary-foreground: oklch(0.255 0.085 331.192);
  --secondary: oklch(0.931 0 180);
  --secondary-foreground: oklch(0.428 0 180);
  --accent: oklch(0.864 0.008 17.305);
  --accent-foreground: oklch(0.343 0.013 17.822);
  --destructive: oklch(0.466 0.14 41.734);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.773 0.129 329.677);
  --chart-1: oklch(0.773 0.129 329.677);
  --chart-2: oklch(0.931 0 180);
  --chart-3: oklch(0.864 0.008 17.305);
  --chart-4: oklch(0.954 0 180);
  --chart-5: oklch(0.773 0.135 329.753);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.128 0.015 328.79);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.233 0.017 328.791);
  --muted-foreground: oklch(0.682 0.004 328.119);
  --popover: oklch(0.141 0.017 329.125);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.141 0.017 329.125);
  --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.773 0.129 329.677);
  --primary-foreground: oklch(0.255 0.085 331.192);
  --secondary: oklch(0.223 0.013 328.655);
  --secondary-foreground: oklch(0.766 0.025 328.402);
  --accent: oklch(0.313 0.039 329.288);
  --accent-foreground: oklch(0.837 0.031 328.439);
  --destructive: oklch(0.723 0.176 45.765);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.773 0.129 329.677);
  --chart-1: oklch(0.773 0.129 329.677);
  --chart-2: oklch(0.223 0.013 328.655);
  --chart-3: oklch(0.313 0.039 329.288);
  --chart-4: oklch(0.255 0.016 328.7);
  --chart-5: oklch(0.773 0.135 329.753);
}