Dairy for shadcn/ui

Dairy is a shadcn/ui theme built around a neutral gray primary color (#3a4140) with muted light teal accents (#dde3e2). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#3a4140) on a teal-tinted background (#070e0c).

Color palette

TokenLightDark
Background
#ffffffwhite
#070e0cblack
Foreground
#010504black
#ffffffwhite
Card
#ffffffwhite
#070e0cblack
Card foreground
#010504black
#ffffffwhite
Popover
#ffffffwhite
#070e0cblack
Popover foreground
#010504black
#ffffffwhite
Primary
#3a4140darkslategray
#3a4140darkslategray
Primary foreground
#d4d9d8lightgrey
#d4d9d8lightgrey
Secondary
#dde3e2gainsboro
#293d39darkslategray
Secondary foreground
#404f4cdarkslategray
#c2d6d2lightgrey
Muted
#d1e5e2gainsboro
#1a2e2adarkslategray
Muted foreground
#556260dimgray
#9daaa7darkgray
Accent
#dde3e2gainsboro
#293d39darkslategray
Accent foreground
#404f4cdarkslategray
#c2d6d2lightgrey
Destructive
#bf2012firebrick
#d72414firebrick
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3a4140darkslategray
#3a4140darkslategray

Contrast

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

Light mode
Text on background20.49:1AAA
Text on card20.49:1AAA
Primary button7.34:1AAA
Secondary button6.64:1AA
Muted text4.86:1AA
Accent6.64:1AA
Destructive6.10:1AA
Dark mode
Text on background19.52:1AAA
Text on card19.52:1AAA
Primary button7.34:1AAA
Secondary button7.58:1AAA
Muted text5.97:1AA
Accent7.58:1AAA
Destructive5.06:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.102 0.015 184.009);
  --muted: oklch(0.907 0.022 183.659);
  --muted-foreground: oklch(0.485 0.016 183.393);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.102 0.015 184.009);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.102 0.015 184.009);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.368 0.01 183.57);
  --primary-foreground: oklch(0.88 0.005 184.146);
  --secondary: oklch(0.912 0.007 184.114);
  --secondary-foreground: oklch(0.413 0.019 183.059);
  --accent: oklch(0.912 0.007 184.114);
  --accent-foreground: oklch(0.413 0.019 183.059);
  --destructive: oklch(0.519 0.195 30.064);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.368 0.01 183.57);
  --chart-1: oklch(0.368 0.01 183.57);
  --chart-2: oklch(0.912 0.007 184.114);
  --chart-3: oklch(0.912 0.007 184.114);
  --chart-4: oklch(0.934 0.005 184.168);
  --chart-5: oklch(0.371 0.015 183.21);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.154 0.012 182.74);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.282 0.027 181.413);
  --muted-foreground: oklch(0.726 0.015 183.758);
  --popover: oklch(0.154 0.012 182.74);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.154 0.012 182.74);
  --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.368 0.01 183.57);
  --primary-foreground: oklch(0.88 0.005 184.146);
  --secondary: oklch(0.342 0.027 182.019);
  --secondary-foreground: oklch(0.86 0.022 183.6);
  --accent: oklch(0.342 0.027 182.019);
  --accent-foreground: oklch(0.86 0.022 183.6);
  --destructive: oklch(0.565 0.213 30.076);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.368 0.01 183.57);
  --chart-1: oklch(0.368 0.01 183.57);
  --chart-2: oklch(0.342 0.027 182.019);
  --chart-3: oklch(0.342 0.027 182.019);
  --chart-4: oklch(0.375 0.03 181.956);
  --chart-5: oklch(0.371 0.015 183.21);
}