Milky for shadcn/ui

Milky is a shadcn/ui theme built around a vivid deep red primary color (#3d000e) with vivid deep blue accents (#000e3d). The light mode uses a neutral background (#fdf7f8). Dark mode keeps the vivid deep red primary (#3d000e) on a neutral background (#040102).

Color palette

TokenLightDark
Background
#fdf7f8snow
#040102black
Foreground
#000000black
#f8f6f7whitesmoke
Card
#fcf3f5lavenderblush
#070304black
Card foreground
#000000black
#fbf9fasnow
Popover
#fcf3f5lavenderblush
#070304black
Popover foreground
#000000black
#fbf9fasnow
Primary
#3d000eblack
#3d000eblack
Primary foreground
#ff7092lightcoral
#ff7092lightcoral
Secondary
#0e3d00darkgreen
#0e3d00darkgreen
Secondary foreground
#43ff0alawngreen
#43ff0alawngreen
Muted
#e8efe6beige
#121910black
Muted foreground
#474747darkslategray
#b8b8b8silver
Accent
#000e3dmidnightblue
#000e3dmidnightblue
Accent foreground
#7092ffcornflowerblue
#7092ffcornflowerblue
Destructive
#c64710chocolate
#d94d12chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3d000eblack
#3d000eblack

Contrast

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

Light mode
Text on background19.83:1AAA
Text on card19.27:1AAA
Primary button6.61:1AA
Secondary button9.19:1AAA
Muted text7.92:1AAA
Accent6.39:1AA
Destructive4.87:1AA
Dark mode
Text on background19.29:1AAA
Text on card19.58:1AAA
Primary button6.61:1AA
Secondary button9.19:1AAA
Muted text9.04:1AAA
Accent6.39:1AA
Destructive4.17:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.006 1.141);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.944 0.013 138.345);
  --muted-foreground: oklch(0.399 0 180);
  --popover: oklch(0.972 0.01 1.234);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.972 0.01 1.234);
  --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.229 0.092 14.841);
  --primary-foreground: oklch(0.727 0.176 8.018);
  --secondary: oklch(0.317 0.101 139.625);
  --secondary-foreground: oklch(0.873 0.285 140.918);
  --accent: oklch(0.194 0.093 262.449);
  --accent-foreground: oklch(0.684 0.165 268.98);
  --destructive: oklch(0.567 0.173 39.382);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.229 0.092 14.841);
  --chart-1: oklch(0.229 0.092 14.841);
  --chart-2: oklch(0.317 0.101 139.625);
  --chart-3: oklch(0.194 0.093 262.449);
  --chart-4: oklch(0.366 0.118 140.054);
  --chart-5: oklch(0.23 0.094 15.145);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.085 0.012 0.976);
  --foreground: oklch(0.976 0.002 1.019);
  --muted: oklch(0.202 0.019 138.453);
  --muted-foreground: oklch(0.781 0 180);
  --popover: oklch(0.107 0.015 0.976);
  --popover-foreground: oklch(0.984 0.001 0.999);
  --card: oklch(0.107 0.015 0.976);
  --card-foreground: oklch(0.984 0.001 0.999);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.229 0.092 14.841);
  --primary-foreground: oklch(0.727 0.176 8.018);
  --secondary: oklch(0.317 0.101 139.625);
  --secondary-foreground: oklch(0.873 0.285 140.918);
  --accent: oklch(0.194 0.093 262.449);
  --accent-foreground: oklch(0.684 0.165 268.98);
  --destructive: oklch(0.606 0.186 39.254);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.229 0.092 14.841);
  --chart-1: oklch(0.229 0.092 14.841);
  --chart-2: oklch(0.317 0.101 139.625);
  --chart-3: oklch(0.194 0.093 262.449);
  --chart-4: oklch(0.366 0.118 140.054);
  --chart-5: oklch(0.23 0.094 15.145);
}