Lotion for shadcn/ui

Lotion is a shadcn/ui theme built around a light blue primary color (#e2e9f9) with neutral gray accents (#e1e2e5). The light mode uses a neutral background (#ffffff). Dark mode keeps the light blue primary (#e2e9f9) on a blue-tinted background (#07090e).

Color palette

TokenLightDark
Background
#ffffffwhite
#07090eblack
Foreground
#02060dblack
#ffffffwhite
Card
#ffffffwhite
#07090eblack
Card foreground
#02060dblack
#ffffffwhite
Popover
#ffffffwhite
#07090eblack
Popover foreground
#02060dblack
#ffffffwhite
Primary
#e2e9f9lavender
#e2e9f9lavender
Primary foreground
#1d408bdarkslateblue
#1d408bdarkslateblue
Secondary
#e1e2e5gainsboro
#12151cblack
Secondary foreground
#46484edarkslategray
#a0aac0darkgray
Muted
#dce0eagainsboro
#151923black
Muted foreground
#565658dimgray
#a7a8a9darkgray
Accent
#e1e2e5gainsboro
#12151cblack
Accent foreground
#46484edarkslategray
#a0aac0darkgray
Destructive
#d72004firebrick
#fb492dtomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e2e9f9lavender
#e2e9f9lavender

Contrast

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

Light mode
Text on background20.30:1AAA
Text on card20.30:1AAA
Primary button7.98:1AAA
Secondary button7.07:1AAA
Muted text5.54:1AA
Accent7.07:1AAA
Destructive5.12:1AA
Dark mode
Text on background19.93:1AAA
Text on card19.93:1AAA
Primary button7.98:1AAA
Secondary button7.81:1AAA
Muted text7.35:1AAA
Accent7.81:1AAA
Destructive3.46:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.119 0.021 256.162);
  --muted: oklch(0.907 0.014 265.929);
  --muted-foreground: oklch(0.454 0.002 265.987);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.119 0.021 256.162);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.119 0.021 256.162);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.933 0.023 265.88);
  --primary-foreground: oklch(0.393 0.131 263.043);
  --secondary: oklch(0.914 0.003 265.99);
  --secondary-foreground: oklch(0.402 0.011 265.866);
  --accent: oklch(0.914 0.003 265.99);
  --accent-foreground: oklch(0.402 0.011 265.866);
  --destructive: oklch(0.563 0.216 31.089);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.933 0.023 265.88);
  --chart-1: oklch(0.933 0.023 265.88);
  --chart-2: oklch(0.914 0.003 265.99);
  --chart-3: oklch(0.914 0.003 265.99);
  --chart-4: oklch(0.937 0.002 265.995);
  --chart-5: oklch(0.932 0.024 265.873);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.011 262.918);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.215 0.021 265.306);
  --muted-foreground: oklch(0.731 0.002 265.996);
  --popover: oklch(0.139 0.011 262.918);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.139 0.011 262.918);
  --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.933 0.023 265.88);
  --primary-foreground: oklch(0.393 0.131 263.043);
  --secondary: oklch(0.197 0.013 265.562);
  --secondary-foreground: oklch(0.738 0.033 265.744);
  --accent: oklch(0.197 0.013 265.562);
  --accent-foreground: oklch(0.738 0.033 265.744);
  --destructive: oklch(0.658 0.219 31.65);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.933 0.023 265.88);
  --chart-1: oklch(0.933 0.023 265.88);
  --chart-2: oklch(0.197 0.013 265.562);
  --chart-3: oklch(0.197 0.013 265.562);
  --chart-4: oklch(0.228 0.017 265.498);
  --chart-5: oklch(0.932 0.024 265.873);
}