Cautious is a shadcn/ui theme built around a near-white primary color (#f2f1f3) with near-white accents (#f1f3f2). The light mode uses a neutral background (#f8f6fd). Dark mode keeps the near-white primary (#f2f1f3) on a neutral background (#020203).
| Token | Light | Dark |
|---|---|---|
| Background | #f8f6fdghostwhite | #020203black |
| Foreground | #090316black | #f6f5f9whitesmoke |
| Card | #f5f2fcghostwhite | #040307black |
| Card foreground | #070212black | #f9f8fbghostwhite |
| Popover | #f5f2fcghostwhite | #040307black |
| Popover foreground | #070212black | #f9f8fbghostwhite |
| Primary | #f2f1f3whitesmoke | #f2f1f3whitesmoke |
| Primary foreground | #57545fdimgray | #57545fdimgray |
| Secondary | #f3f2f1whitesmoke | #f3f2f1whitesmoke |
| Secondary foreground | #5f5754dimgray | #5f5754dimgray |
| Muted | #efececlinen | #131110black |
| Muted foreground | #585656dimgray | #a9a8a7darkgray |
| Accent | #f1f3f2whitesmoke | #f1f3f2whitesmoke |
| Accent foreground | #545f57dimgray | #545f57dimgray |
| Destructive | #8e0d06darkred | #f63228crimson |
| Destructive foreground | #fdccc9pink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #f2f1f3whitesmoke | #f2f1f3whitesmoke |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.98:1 | AAA |
| Text on card | 18.53:1 | AAA |
| Primary button | 6.59:1 | AA |
| Secondary button | 6.30:1 | AA |
| Muted text | 6.22:1 | AA |
| Accent | 5.98:1 | AA |
| Destructive | 6.63:1 | AA |
| Text on background | 19.12:1 | AAA |
| Text on card | 19.39:1 | AAA |
| Primary button | 6.59:1 | AA |
| Secondary button | 6.30:1 | AA |
| Muted text | 7.91:1 | AAA |
| Accent | 5.98:1 | AA |
| Destructive | 3.88:1 | AA Large |
Paste this into your globals.css to use Cautious in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.978 0.009 299.142);
--foreground: oklch(0.127 0.046 295.68);
--muted: oklch(0.946 0.003 43.103);
--muted-foreground: oklch(0.455 0.002 43.094);
--popover: oklch(0.967 0.014 299.057);
--popover-foreground: oklch(0.116 0.04 297.397);
--card: oklch(0.967 0.014 299.057);
--card-foreground: oklch(0.116 0.04 297.397);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.96 0.002 299.267);
--primary-foreground: oklch(0.452 0.018 298.634);
--secondary: oklch(0.962 0.001 43.118);
--secondary-foreground: oklch(0.463 0.011 42.928);
--accent: oklch(0.963 0.002 155.15);
--accent-foreground: oklch(0.472 0.018 154.47);
--destructive: oklch(0.412 0.161 29.508);
--destructive-foreground: oklch(0.886 0.056 21.78);
--ring: oklch(0.96 0.002 299.267);
--chart-1: oklch(0.96 0.002 299.267);
--chart-2: oklch(0.962 0.001 43.118);
--chart-3: oklch(0.963 0.002 155.15);
--chart-4: oklch(0.985 0.001 43.126);
--chart-5: oklch(0.96 0.003 299.248);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.084 0.01 299.328);
--foreground: oklch(0.973 0.006 299.202);
--muted: oklch(0.181 0.004 42.933);
--muted-foreground: oklch(0.732 0.002 43.11);
--popover: oklch(0.106 0.012 299.328);
--popover-foreground: oklch(0.982 0.004 299.237);
--card: oklch(0.106 0.012 299.328);
--card-foreground: oklch(0.982 0.004 299.237);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.96 0.002 299.267);
--primary-foreground: oklch(0.452 0.018 298.634);
--secondary: oklch(0.962 0.001 43.118);
--secondary-foreground: oklch(0.463 0.011 42.928);
--accent: oklch(0.963 0.002 155.15);
--accent-foreground: oklch(0.472 0.018 154.47);
--destructive: oklch(0.631 0.231 28.835);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.96 0.002 299.267);
--chart-1: oklch(0.96 0.002 299.267);
--chart-2: oklch(0.962 0.001 43.118);
--chart-3: oklch(0.963 0.002 155.15);
--chart-4: oklch(0.985 0.001 43.126);
--chart-5: oklch(0.96 0.003 299.248);
}