Cavernous for shadcn/ui

Cavernous is a shadcn/ui theme built around a muted blue primary color (#959cb1) with muted green accents (#9cb195). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted blue primary (#959cb1) on a blue-tinted background (#05080f).

Color palette

TokenLightDark
Background
#ffffffwhite
#05080fblack
Foreground
#02050dblack
#ffffffwhite
Card
#fcfcfcsnow
#070a13black
Card foreground
#010309black
#ffffffwhite
Popover
#fcfcfcsnow
#070a13black
Popover foreground
#010309black
#ffffffwhite
Primary
#959cb1darkgray
#959cb1darkgray
Primary foreground
#09090cblack
#09090cblack
Secondary
#b1959crosybrown
#b1959crosybrown
Secondary foreground
#0c0909black
#0c0909black
Muted
#dfd3d6gainsboro
#2c2023darkslategray
Muted foreground
#6b6163dimgray
#9e9496darkgray
Accent
#9cb195darkseagreen
#9cb195darkseagreen
Accent foreground
#090c09black
#090c09black
Destructive
#d71204red
#fa2314orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#959cb1darkgray
#959cb1darkgray

Contrast

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

Light mode
Text on background20.38:1AAA
Text on card20.17:1AAA
Primary button7.28:1AAA
Secondary button7.25:1AAA
Muted text4.09:1AA Large
Accent8.55:1AAA
Destructive5.27:1AA
Dark mode
Text on background20.05:1AAA
Text on card19.81:1AAA
Primary button7.28:1AAA
Secondary button7.25:1AAA
Muted text5.31:1AA
Accent8.55:1AAA
Destructive3.94:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.115 0.023 261.373);
  --muted: oklch(0.876 0.014 0.317);
  --muted-foreground: oklch(0.503 0.014 0.618);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.1 0.02 260.954);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.1 0.02 260.954);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.695 0.031 270.936);
  --primary-foreground: oklch(0.142 0.005 270.239);
  --secondary: oklch(0.698 0.034 1.211);
  --secondary-foreground: oklch(0.143 0.006 0.29);
  --accent: oklch(0.737 0.045 137.874);
  --accent-foreground: oklch(0.149 0.008 137.509);
  --destructive: oklch(0.557 0.222 29.804);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.695 0.031 270.936);
  --chart-1: oklch(0.695 0.031 270.936);
  --chart-2: oklch(0.698 0.034 1.211);
  --chart-3: oklch(0.737 0.045 137.874);
  --chart-4: oklch(0.724 0.031 1.044);
  --chart-5: oklch(0.691 0.038 270.822);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.133 0.018 266.36);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.26 0.02 1.921);
  --muted-foreground: oklch(0.676 0.013 0.386);
  --popover: oklch(0.144 0.021 267.756);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.144 0.021 267.756);
  --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.695 0.031 270.936);
  --primary-foreground: oklch(0.142 0.005 270.239);
  --secondary: oklch(0.698 0.034 1.211);
  --secondary-foreground: oklch(0.143 0.006 0.29);
  --accent: oklch(0.737 0.045 137.874);
  --accent-foreground: oklch(0.149 0.008 137.509);
  --destructive: oklch(0.63 0.244 29.731);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.695 0.031 270.936);
  --chart-1: oklch(0.695 0.031 270.936);
  --chart-2: oklch(0.698 0.034 1.211);
  --chart-3: oklch(0.737 0.045 137.874);
  --chart-4: oklch(0.724 0.031 1.044);
  --chart-5: oklch(0.691 0.038 270.822);
}