light for shadcn/ui

light is a shadcn/ui theme built around a muted deep blue primary color (#33374d) with muted light blue accents (#bec1ca). The light mode uses a blue-tinted background (#e9eaed). Dark mode switches to a vivid blue primary (#5470ff) on a blue-tinted background (#edf0ff).

Color palette

TokenLightDark
Background
#e9eaedlavender
#edf0ffaliceblue
Foreground
#33374ddarkslategray
#404878darkslateblue
Card
#e3e4e8gainsboro
#ebeefflavender
Card foreground
#292c3ddarkslategray
#404878darkslateblue
Popover
#e0e2e6gainsboro
#ebeefflavender
Popover foreground
#1f212edarkslategray
#1f212edarkslategray
Primary
#33374ddarkslategray
#5470ffroyalblue
Primary foreground
#d1d4e0lightgrey
#e0e5fflavender
Secondary
#b9bbc6silver
#d6dcfflavender
Secondary foreground
#22242adarkslategray
#515a8fdarkslateblue
Muted
#dddfe4gainsboro
#dde3fflavender
Muted foreground
#3f4350darkslategray
#7f87aclightslategray
Accent
#bec1casilver
#cccffflavender
Accent foreground
#272930darkslategray
#626697slategray
Destructive
#bd0a0afirebrick
#fd4d4dtomato
Destructive foreground
#fffafasnow
#fcf5f5lavenderblush
Border
#dededegainsboro
#cdd2eegainsboro
Input
#d6d6d6lightgrey
#c9cee6lightgrey
Ring
#33374ddarkslategray
#5470ffroyalblue

Contrast

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

Light mode
Text on background9.69:1AAA
Text on card10.87:1AAA
Primary button7.90:1AAA
Secondary button8.11:1AAA
Muted text7.36:1AAA
Accent8.10:1AAA
Destructive6.32:1AA
Dark mode
Text on background7.66:1AAA
Text on card7.54:1AAA
Primary button3.26:1AA Large
Secondary button4.85:1AA
Muted text2.77:1Fail
Accent3.61:1AA Large
Destructive3.08:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.936 0.004 271.367);
  --foreground: oklch(0.343 0.038 275.482);
  --muted: oklch(0.903 0.008 271.329);
  --muted-foreground: oklch(0.384 0.023 270.768);
  --popover: oklch(0.912 0.006 271.349);
  --popover-foreground: oklch(0.252 0.024 275.715);
  --card: oklch(0.92 0.005 271.355);
  --card-foreground: oklch(0.298 0.031 275.577);
  --border: oklch(0.9 0 188.746);
  --input: oklch(0.877 0 180);
  --primary: oklch(0.343 0.038 275.482);
  --primary-foreground: oklch(0.871 0.018 276.972);
  --secondary: oklch(0.794 0.015 276.991);
  --secondary-foreground: oklch(0.26 0.012 276.576);
  --accent: oklch(0.813 0.013 271.259);
  --accent-foreground: oklch(0.282 0.012 270.952);
  --destructive: oklch(0.504 0.203 28.762);
  --destructive-foreground: oklch(0.989 0.005 17.24);
  --ring: oklch(0.343 0.038 275.482);
  --chart-1: oklch(0.343 0.038 275.482);
  --chart-2: oklch(0.794 0.015 276.991);
  --chart-3: oklch(0.813 0.013 271.259);
  --chart-4: oklch(0.819 0.013 277.034);
  --chart-5: oklch(0.339 0.044 275.14);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.957 0.02 276.96);
  --foreground: oklch(0.418 0.081 275.191);
  --muted: oklch(0.92 0.039 276.646);
  --muted-foreground: oklch(0.63 0.056 275.681);
  --popover: oklch(0.952 0.023 277.957);
  --popover-foreground: oklch(0.252 0.024 275.715);
  --card: oklch(0.952 0.023 276.918);
  --card-foreground: oklch(0.418 0.08 275.097);
  --border: oklch(0.87 0.039 276.599);
  --input: oklch(0.856 0.034 276.056);
  --primary: oklch(0.606 0.213 270.22);
  --primary-foreground: oklch(0.926 0.036 276.694);
  --secondary: oklch(0.901 0.048 276.652);
  --secondary-foreground: oklch(0.484 0.086 275.324);
  --accent: oklch(0.869 0.066 281.264);
  --accent-foreground: oklch(0.527 0.077 279.815);
  --destructive: oklch(0.669 0.213 25.022);
  --destructive-foreground: oklch(0.977 0.007 17.278);
  --ring: oklch(0.605 0.214 270.336);
  --chart-1: oklch(0.606 0.213 270.22);
  --chart-2: oklch(0.901 0.048 276.652);
  --chart-3: oklch(0.869 0.066 281.264);
  --chart-4: oklch(0.938 0.03 276.991);
  --chart-5: oklch(0.603 0.219 269.945);
}