Yin for shadcn/ui

Yin is a shadcn/ui theme built around a deep blue primary color (#09172a) with muted light blue accents (#cfd5dd). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep blue primary (#09172a) on a neutral background (#030507).

Color palette

TokenLightDark
Background
#ffffffwhite
#030507black
Foreground
#010204black
#f9fafbghostwhite
Card
#ffffffwhite
#030507black
Card foreground
#010204black
#f9fafbghostwhite
Popover
#ffffffwhite
#030507black
Popover foreground
#010204black
#f9fafbghostwhite
Primary
#09172ablack
#09172ablack
Primary foreground
#80aae5cornflowerblue
#80aae5cornflowerblue
Secondary
#e5e8eblavender
#2e3238darkslategray
Secondary foreground
#464d59darkslategray
#c7cbd1lightgrey
Muted
#e5eaf1lavender
#0e131ablack
Muted foreground
#505a68dimgray
#97a1afdarkgray
Accent
#cfd5ddlightgrey
#3b4554darkslategray
Accent foreground
#333b48darkslategray
#dbdfe6gainsboro
Destructive
#973602saddlebrown
#fb6413orangered
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#09172ablack
#09172ablack

Contrast

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

Light mode
Text on background20.75:1AAA
Text on card20.75:1AAA
Primary button7.55:1AAA
Secondary button6.90:1AA
Muted text5.76:1AA
Accent7.64:1AAA
Destructive7.38:1AAA
Dark mode
Text on background19.54:1AAA
Text on card19.54:1AAA
Primary button7.55:1AAA
Secondary button7.88:1AAA
Muted text7.10:1AAA
Accent7.24:1AAA
Destructive6.95:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.086 0.013 246.175);
  --muted: oklch(0.934 0.011 256.696);
  --muted-foreground: oklch(0.463 0.026 256.798);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.086 0.013 246.175);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.086 0.013 246.175);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.203 0.044 257.04);
  --primary-foreground: oklch(0.731 0.098 256.875);
  --secondary: oklch(0.929 0.005 256.674);
  --secondary-foreground: oklch(0.419 0.021 256.789);
  --accent: oklch(0.871 0.013 256.707);
  --accent-foreground: oklch(0.351 0.024 256.814);
  --destructive: oklch(0.466 0.14 41.734);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.203 0.044 257.04);
  --chart-1: oklch(0.203 0.044 257.04);
  --chart-2: oklch(0.929 0.005 256.674);
  --chart-3: oklch(0.871 0.013 256.707);
  --chart-4: oklch(0.953 0.003 256.666);
  --chart-5: oklch(0.202 0.046 256.993);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.112 0.008 251.562);
  --foreground: oklch(0.984 0.002 256.66);
  --muted: oklch(0.187 0.016 256.831);
  --muted-foreground: oklch(0.706 0.023 256.757);
  --popover: oklch(0.112 0.008 251.562);
  --popover-foreground: oklch(0.984 0.002 256.66);
  --card: oklch(0.112 0.008 251.562);
  --card-foreground: oklch(0.984 0.002 256.66);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.203 0.044 257.04);
  --primary-foreground: oklch(0.731 0.098 256.875);
  --secondary: oklch(0.316 0.011 256.76);
  --secondary-foreground: oklch(0.841 0.009 256.691);
  --accent: oklch(0.388 0.029 256.82);
  --accent-foreground: oklch(0.903 0.01 256.695);
  --destructive: oklch(0.689 0.201 42.3);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.203 0.044 257.04);
  --chart-1: oklch(0.203 0.044 257.04);
  --chart-2: oklch(0.316 0.011 256.76);
  --chart-3: oklch(0.388 0.029 256.82);
  --chart-4: oklch(0.346 0.012 256.762);
  --chart-5: oklch(0.202 0.046 256.993);
}