Coffee for shadcn/ui

Coffee is a shadcn/ui theme built around a near-white primary color (#e7e9e7) with near-white accents (#e7e9e8). The light mode uses a neutral background (#f8fdf7). Dark mode keeps the near-white primary (#e7e9e7) on a green-tinted background (#050b04).

Color palette

TokenLightDark
Background
#f8fdf7mintcream
#050b04black
Foreground
#030e02black
#f8fcf8mintcream
Card
#f4fbf3whitesmoke
#060f06black
Card foreground
#020901black
#fcfdfcwhite
Popover
#f8fdf7mintcream
#050b04black
Popover foreground
#030e02black
#f8fcf8mintcream
Primary
#e7e9e7lavender
#e7e9e7lavender
Primary foreground
#4c524cdarkslategray
#4c524cdarkslategray
Secondary
#e8e9e7linen
#e8e9e7linen
Secondary foreground
#4f524cdarkslategray
#4f524cdarkslategray
Muted
#e3e7dfgainsboro
#1d2018black
Muted foreground
#687557dimgray
#9ba88adarkseagreen
Accent
#e7e9e8lavender
#e7e9e8lavender
Accent foreground
#4c524fdarkslategray
#4c524fdarkslategray
Destructive
#9e2500firebrick
#ff5b29tomato
Destructive foreground
#ffdcd1bisque
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e7e9e7lavender
#e7e9e7lavender

Contrast

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

Light mode
Text on background19.03:1AAA
Text on card19.18:1AAA
Primary button6.57:1AA
Secondary button6.52:1AA
Muted text3.92:1AA Large
Accent6.55:1AA
Destructive6.03:1AA
Dark mode
Text on background19.18:1AAA
Text on card19.10:1AAA
Primary button6.57:1AA
Secondary button6.52:1AA
Muted text6.58:1AA
Accent6.55:1AA
Destructive6.77:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.009 143.587);
  --foreground: oklch(0.144 0.037 141.31);
  --muted: oklch(0.923 0.011 125.901);
  --muted-foreground: oklch(0.544 0.049 126.988);
  --popover: oklch(0.988 0.009 143.587);
  --popover-foreground: oklch(0.144 0.037 141.31);
  --card: oklch(0.981 0.014 143.563);
  --card-foreground: oklch(0.125 0.032 141.267);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.932 0.003 143.618);
  --primary-foreground: oklch(0.432 0.013 143.479);
  --secondary: oklch(0.933 0.003 125.777);
  --secondary-foreground: oklch(0.435 0.011 126.073);
  --accent: oklch(0.932 0.002 161.746);
  --accent-foreground: oklch(0.432 0.01 161.241);
  --destructive: oklch(0.46 0.162 34.788);
  --destructive-foreground: oklch(0.92 0.042 37.603);
  --ring: oklch(0.932 0.003 143.618);
  --chart-1: oklch(0.932 0.003 143.618);
  --chart-2: oklch(0.933 0.003 125.777);
  --chart-3: oklch(0.932 0.002 161.746);
  --chart-4: oklch(0.955 0.002 125.763);
  --chart-5: oklch(0.933 0.005 143.605);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.022 142.248);
  --foreground: oklch(0.987 0.006 143.602);
  --muted: oklch(0.237 0.015 126.634);
  --muted-foreground: oklch(0.714 0.046 126.618);
  --popover: oklch(0.139 0.022 142.248);
  --popover-foreground: oklch(0.987 0.006 143.602);
  --card: oklch(0.155 0.025 142.328);
  --card-foreground: oklch(0.993 0.003 143.619);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.932 0.003 143.618);
  --primary-foreground: oklch(0.432 0.013 143.479);
  --secondary: oklch(0.933 0.003 125.777);
  --secondary-foreground: oklch(0.435 0.011 126.073);
  --accent: oklch(0.932 0.002 161.746);
  --accent-foreground: oklch(0.432 0.01 161.241);
  --destructive: oklch(0.684 0.209 36.512);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.932 0.003 143.618);
  --chart-1: oklch(0.932 0.003 143.618);
  --chart-2: oklch(0.933 0.003 125.777);
  --chart-3: oklch(0.932 0.002 161.746);
  --chart-4: oklch(0.955 0.002 125.763);
  --chart-5: oklch(0.933 0.005 143.605);
}