Caution is a shadcn/ui theme built around a neutral gray primary color (#292929) with neutral gray accents (#292929). The light mode uses a neutral background (#fefbfb). Dark mode keeps the neutral gray primary (#292929) on a neutral background (#080303).
| Token | Light | Dark |
|---|---|---|
| Background | #fefbfbsnow | #080303black |
| Foreground | #080202black | #ffffffwhite |
| Card | #fcf7f7snow | #0b0404black |
| Card foreground | #040101black | #ffffffwhite |
| Popover | #fcf7f7snow | #0b0404black |
| Popover foreground | #040101black | #ffffffwhite |
| Primary | #292929darkslategray | #292929darkslategray |
| Primary foreground | #c2c2c2silver | #c2c2c2silver |
| Secondary | #292929darkslategray | #292929darkslategray |
| Secondary foreground | #c2c2c2silver | #c2c2c2silver |
| Muted | #e2d0d0lightgrey | #2f1d1dblack |
| Muted foreground | #685050dimgray | #af9797rosybrown |
| Accent | #292929darkslategray | #292929darkslategray |
| Accent foreground | #c2c2c2silver | #c2c2c2silver |
| Destructive | #611e0amaroon | #ea5a2echocolate |
| Destructive foreground | #f6b9a7lightpink | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #292929darkslategray | #292929darkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.02:1 | AAA |
| Text on card | 19.66:1 | AAA |
| Primary button | 8.18:1 | AAA |
| Secondary button | 8.18:1 | AAA |
| Muted text | 4.96:1 | AA |
| Accent | 8.18:1 | AAA |
| Destructive | 7.28:1 | AAA |
| Text on background | 20.53:1 | AAA |
| Text on card | 20.31:1 | AAA |
| Primary button | 8.18:1 | AAA |
| Secondary button | 8.18:1 | AAA |
| Muted text | 5.83:1 | AA |
| Accent | 8.18:1 | AAA |
| Destructive | 6.01:1 | AA |
Paste this into your globals.css to use Caution in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.003 17.202);
--foreground: oklch(0.104 0.018 20.688);
--muted: oklch(0.872 0.02 17.535);
--muted-foreground: oklch(0.456 0.032 18.402);
--popover: oklch(0.981 0.005 17.246);
--popover-foreground: oklch(0.082 0.014 20.688);
--card: oklch(0.981 0.005 17.246);
--card-foreground: oklch(0.082 0.014 20.688);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.28 0 180);
--primary-foreground: oklch(0.813 0 165.964);
--secondary: oklch(0.28 0 180);
--secondary-foreground: oklch(0.813 0 165.964);
--accent: oklch(0.28 0 180);
--accent-foreground: oklch(0.813 0 165.964);
--destructive: oklch(0.339 0.102 36.614);
--destructive-foreground: oklch(0.838 0.076 37.606);
--ring: oklch(0.28 0 180);
--chart-1: oklch(0.28 0 180);
--chart-2: oklch(0.28 0 180);
--chart-3: oklch(0.28 0 180);
--chart-4: oklch(0.311 0 180);
--chart-5: oklch(0.278 0.004 17.374);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.106 0.015 19.87);
--foreground: oklch(1 0 180);
--muted: oklch(0.255 0.028 19.162);
--muted-foreground: oklch(0.699 0.028 17.854);
--popover: oklch(0.121 0.017 19.883);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.121 0.017 19.883);
--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.28 0 180);
--primary-foreground: oklch(0.813 0 165.964);
--secondary: oklch(0.28 0 180);
--secondary-foreground: oklch(0.813 0 165.964);
--accent: oklch(0.28 0 180);
--accent-foreground: oklch(0.813 0 165.964);
--destructive: oklch(0.651 0.188 36.926);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.28 0 180);
--chart-1: oklch(0.28 0 180);
--chart-2: oklch(0.28 0 180);
--chart-3: oklch(0.28 0 180);
--chart-4: oklch(0.311 0 180);
--chart-5: oklch(0.278 0.004 17.374);
}