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).
| Token | Light | Dark |
|---|---|---|
| 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 |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.38:1 | AAA |
| Text on card | 20.17:1 | AAA |
| Primary button | 7.28:1 | AAA |
| Secondary button | 7.25:1 | AAA |
| Muted text | 4.09:1 | AA Large |
| Accent | 8.55:1 | AAA |
| Destructive | 5.27:1 | AA |
| Text on background | 20.05:1 | AAA |
| Text on card | 19.81:1 | AAA |
| Primary button | 7.28:1 | AAA |
| Secondary button | 7.25:1 | AAA |
| Muted text | 5.31:1 | AA |
| Accent | 8.55:1 | AAA |
| Destructive | 3.94:1 | AA Large |
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);
}