Cavernous is a shadcn/ui theme built around a deep green primary color (#153821) with deep teal accents (#153833). The light mode uses a neutral background (#f8fcf9). Dark mode keeps the deep green primary (#153821) on a neutral background (#020804).
| Token | Light | Dark |
|---|---|---|
| Background | #f8fcf9mintcream | #020804black |
| Foreground | #010402black | #f9fbfamintcream |
| Card | #f4fbf6mintcream | #030c06black |
| Card foreground | #000000black | #fcfdfcwhite |
| Popover | #f4fbf6mintcream | #030c06black |
| Popover foreground | #000000black | #fcfdfcwhite |
| Primary | #153821darkslategray | #153821darkslategray |
| Primary foreground | #a2ddb6silver | #a2ddb6silver |
| Secondary | #1a3815darkgreen | #1a3815darkgreen |
| Secondary foreground | #abdda2lightgreen | #abdda2lightgreen |
| Muted | #dce6dbgainsboro | #1b2419black |
| Muted foreground | #5b6a58dimgray | #98a795darkseagreen |
| Accent | #153833darkslategray | #153833darkslategray |
| Accent foreground | #a2ddd4lightblue | #a2ddd4lightblue |
| Destructive | #d02701firebrick | #ef2d01orangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #153821darkslategray | #153821darkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.90:1 | AAA |
| Text on card | 19.94:1 | AAA |
| Primary button | 8.38:1 | AAA |
| Secondary button | 8.40:1 | AAA |
| Muted text | 4.50:1 | AA |
| Accent | 8.42:1 | AAA |
| Destructive | 5.28:1 | AA |
| Text on background | 19.44:1 | AAA |
| Text on card | 19.43:1 | AAA |
| Primary button | 8.38:1 | AAA |
| Secondary button | 8.40:1 | AAA |
| Muted text | 6.30:1 | AA |
| Accent | 8.42:1 | AAA |
| Destructive | 4.17:1 | AA Large |
Paste this into your globals.css to use Cavernous in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.987 0.006 157.855);
--foreground: oklch(0.098 0.015 157.693);
--muted: oklch(0.915 0.019 141.02);
--muted-foreground: oklch(0.505 0.033 140.926);
--popover: oklch(0.981 0.009 157.789);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.981 0.009 157.789);
--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.307 0.058 152.882);
--primary-foreground: oklch(0.846 0.08 155.795);
--secondary: oklch(0.307 0.069 140.738);
--secondary-foreground: oklch(0.846 0.095 140.831);
--accent: oklch(0.312 0.042 182.317);
--accent-foreground: oklch(0.854 0.061 184.648);
--destructive: oklch(0.554 0.207 32.424);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.307 0.058 152.882);
--chart-1: oklch(0.307 0.058 152.882);
--chart-2: oklch(0.307 0.069 140.738);
--chart-3: oklch(0.312 0.042 182.317);
--chart-4: oklch(0.345 0.08 140.745);
--chart-5: oklch(0.31 0.061 152.565);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.123 0.018 157.693);
--foreground: oklch(0.986 0.002 157.941);
--muted: oklch(0.248 0.026 140.847);
--muted-foreground: oklch(0.711 0.03 140.973);
--popover: oklch(0.141 0.021 157.479);
--popover-foreground: oklch(0.993 0.001 157.963);
--card: oklch(0.141 0.021 157.479);
--card-foreground: oklch(0.993 0.001 157.963);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.307 0.058 152.882);
--primary-foreground: oklch(0.846 0.08 155.795);
--secondary: oklch(0.307 0.069 140.738);
--secondary-foreground: oklch(0.846 0.095 140.831);
--accent: oklch(0.312 0.042 182.317);
--accent-foreground: oklch(0.854 0.061 184.648);
--destructive: oklch(0.613 0.23 32.234);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.307 0.058 152.882);
--chart-1: oklch(0.307 0.058 152.882);
--chart-2: oklch(0.307 0.069 140.738);
--chart-3: oklch(0.312 0.042 182.317);
--chart-4: oklch(0.345 0.08 140.745);
--chart-5: oklch(0.31 0.061 152.565);
}