Caffeine for shadcn/ui

Caffeine is a shadcn/ui theme built around a light indigo primary color (#d7d2f3) with light green accents (#eff3d2). The light mode uses a neutral background (#ffffff). Dark mode keeps the light indigo primary (#d7d2f3) on a neutral background (#030308).

Color palette

TokenLightDark
Background
#ffffffwhite
#030308black
Foreground
#000000black
#ffffffwhite
Card
#ffffffwhite
#030308black
Card foreground
#000000black
#ffffffwhite
Popover
#ffffffwhite
#030308black
Popover foreground
#000000black
#ffffffwhite
Primary
#d7d2f3gainsboro
#d7d2f3gainsboro
Primary foreground
#2b1e76midnightblue
#2b1e76midnightblue
Secondary
#eff3d2beige
#eff3d2beige
Secondary foreground
#202409black
#202409black
Muted
#f4f4f0whitesmoke
#0e0f0bblack
Muted foreground
#515346darkolivegreen
#b7b9acdarkgray
Accent
#eff3d2beige
#eff3d2beige
Accent foreground
#202409black
#202409black
Destructive
#701a00maroon
#ff430aorangered
Destructive foreground
#ffb9a3lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d7d2f3gainsboro
#d7d2f3gainsboro

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button9.32:1AAA
Secondary button14.01:1AAA
Muted text7.12:1AAA
Accent14.01:1AAA
Destructive6.90:1AA
Dark mode
Text on background20.61:1AAA
Text on card20.61:1AAA
Primary button9.32:1AAA
Secondary button14.01:1AAA
Muted text9.67:1AAA
Accent14.01:1AAA
Destructive3.46:1AA Large

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 0 0);
  --muted: oklch(0.966 0.005 113.411);
  --muted-foreground: oklch(0.435 0.02 114.146);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --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.879 0.046 292.319);
  --primary-foreground: oklch(0.317 0.141 281.57);
  --secondary: oklch(0.953 0.044 114.158);
  --secondary-foreground: oklch(0.251 0.044 116.854);
  --accent: oklch(0.953 0.044 114.158);
  --accent-foreground: oklch(0.251 0.044 116.854);
  --destructive: oklch(0.362 0.124 35.905);
  --destructive-foreground: oklch(0.845 0.087 37.622);
  --ring: oklch(0.879 0.046 292.319);
  --chart-1: oklch(0.879 0.046 292.319);
  --chart-2: oklch(0.953 0.044 114.158);
  --chart-3: oklch(0.953 0.044 114.158);
  --chart-4: oklch(0.966 0.032 113.919);
  --chart-5: oklch(0.877 0.048 292.265);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.099 0.019 291.789);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.165 0.008 114.245);
  --muted-foreground: oklch(0.78 0.017 113.715);
  --popover: oklch(0.099 0.019 291.789);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.099 0.019 291.789);
  --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.879 0.046 292.319);
  --primary-foreground: oklch(0.317 0.141 281.57);
  --secondary: oklch(0.953 0.044 114.158);
  --secondary-foreground: oklch(0.251 0.044 116.854);
  --accent: oklch(0.953 0.044 114.158);
  --accent-foreground: oklch(0.251 0.044 116.854);
  --destructive: oklch(0.659 0.23 34.545);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.879 0.046 292.319);
  --chart-1: oklch(0.879 0.046 292.319);
  --chart-2: oklch(0.953 0.044 114.158);
  --chart-3: oklch(0.953 0.044 114.158);
  --chart-4: oklch(0.966 0.032 113.919);
  --chart-5: oklch(0.877 0.048 292.265);
}