Caffeine for shadcn/ui

Caffeine is a shadcn/ui theme built around a light blue primary color (#d4e7f7) with muted light blue accents (#e5e8eb). The light mode uses a neutral background (#ffffff). Dark mode keeps the light blue primary (#d4e7f7) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#010304black
#fcfcfdwhite
Card
#fcfcfcsnow
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#ffffffwhite
#000000black
Popover foreground
#010304black
#fcfcfdwhite
Primary
#d4e7f7lavender
#d4e7f7lavender
Primary foreground
#195080darkslateblue
#195080darkslateblue
Secondary
#e5e8eblavender
#181a1bblack
Secondary foreground
#43505bdarkslategray
#aeb3b7darkgray
Muted
#c9dae8gainsboro
#172736darkslategray
Muted foreground
#505a62dimgray
#9da6afdarkgray
Accent
#e5e8eblavender
#181a1bblack
Accent foreground
#43505bdarkslategray
#aeb3b7darkgray
Destructive
#a20c01darkred
#e91101red
Destructive foreground
#ffd9d6mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d4e7f7lavender
#d4e7f7lavender

Contrast

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

Light mode
Text on background20.66:1AAA
Text on card20.54:1AAA
Primary button6.61:1AA
Secondary button6.73:1AA
Muted text4.92:1AA
Accent6.73:1AA
Destructive6.22:1AA
Dark mode
Text on background20.48:1AAA
Text on card20.67:1AAA
Primary button6.61:1AA
Secondary button8.28:1AAA
Muted text6.15:1AA
Accent8.28:1AAA
Destructive4.60:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.09 0.009 237.074);
  --muted: oklch(0.88 0.026 244.463);
  --muted-foreground: oklch(0.462 0.018 244.578);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.09 0.009 237.074);
  --card: oklch(0.992 0 161.565);
  --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.918 0.029 244.485);
  --primary-foreground: oklch(0.421 0.098 248.963);
  --secondary: oklch(0.93 0.006 244.168);
  --secondary-foreground: oklch(0.424 0.024 244.818);
  --accent: oklch(0.93 0.006 244.168);
  --accent-foreground: oklch(0.424 0.024 244.818);
  --destructive: oklch(0.452 0.18 30.091);
  --destructive-foreground: oklch(0.916 0.042 22.787);
  --ring: oklch(0.918 0.029 244.485);
  --chart-1: oklch(0.918 0.029 244.485);
  --chart-2: oklch(0.93 0.006 244.168);
  --chart-3: oklch(0.93 0.006 244.168);
  --chart-4: oklch(0.953 0.004 244.14);
  --chart-5: oklch(0.918 0.031 244.502);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.001 244.101);
  --muted: oklch(0.267 0.035 245.976);
  --muted-foreground: oklch(0.721 0.016 244.369);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.992 0.001 244.101);
  --card: oklch(0.092 0 180);
  --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.918 0.029 244.485);
  --primary-foreground: oklch(0.421 0.098 248.963);
  --secondary: oklch(0.215 0.004 244.307);
  --secondary-foreground: oklch(0.764 0.008 244.224);
  --accent: oklch(0.215 0.004 244.307);
  --accent-foreground: oklch(0.764 0.008 244.224);
  --destructive: oklch(0.591 0.238 29.825);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.918 0.029 244.485);
  --chart-1: oklch(0.918 0.029 244.485);
  --chart-2: oklch(0.215 0.004 244.307);
  --chart-3: oklch(0.215 0.004 244.307);
  --chart-4: oklch(0.247 0.005 244.327);
  --chart-5: oklch(0.918 0.031 244.502);
}