Caution is a shadcn/ui theme built around a neutral gray primary color (#7d7e7c) with muted light green accents (#ebede8). The light mode uses a neutral background (#fcfdfc). Dark mode keeps the neutral gray primary (#7d7e7c) on a green-tinted background (#080b05).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfdfcwhite | #080b05black |
| Foreground | #0c1604black | #f7f9f6whitesmoke |
| Card | #fafbf8snow | #0a0e06black |
| Card foreground | #0a1103black | #fafbf9snow |
| Popover | #fcfdfcwhite | #080b05black |
| Popover foreground | #0c1604black | #f7f9f6whitesmoke |
| Primary | #7d7e7cgray | #7d7e7cgray |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #ebede8linen | #293022darkslategray |
| Secondary foreground | #1e231bblack | #c1ccb7silver |
| Muted | #f0f2edwhitesmoke | #0f120dblack |
| Muted foreground | #5c6354dimgray | #a3ab9cdarkgray |
| Accent | #ebede8linen | #293022darkslategray |
| Accent foreground | #1e231bblack | #c1ccb7silver |
| Destructive | #7a1506maroon | #ef2a0borangered |
| Destructive foreground | #fcbfb6lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #7d7e7cgray | #7d7e7cgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.22:1 | AAA |
| Text on card | 18.52:1 | AAA |
| Primary button | 4.07:1 | AA Large |
| Secondary button | 13.59:1 | AAA |
| Muted text | 5.54:1 | AA |
| Accent | 13.59:1 | AAA |
| Destructive | 6.85:1 | AA |
| Text on background | 18.74:1 | AAA |
| Text on card | 18.74:1 | AAA |
| Primary button | 4.07:1 | AA Large |
| Secondary button | 8.20:1 | AAA |
| Muted text | 7.96:1 | AAA |
| Accent | 8.20:1 | AAA |
| Destructive | 4.20:1 | AA Large |
Paste this into your globals.css to use Caution in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.002 129.149);
--foreground: oklch(0.184 0.039 130.525);
--muted: oklch(0.959 0.008 129.213);
--muted-foreground: oklch(0.489 0.025 129.674);
--popover: oklch(0.994 0.002 129.149);
--popover-foreground: oklch(0.184 0.039 130.525);
--card: oklch(0.987 0.004 129.172);
--card-foreground: oklch(0.167 0.034 129.357);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.592 0.004 129.198);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.943 0.008 129.211);
--secondary-foreground: oklch(0.247 0.016 129.827);
--accent: oklch(0.943 0.008 129.211);
--accent-foreground: oklch(0.247 0.016 129.827);
--destructive: oklch(0.376 0.137 31.659);
--destructive-foreground: oklch(0.857 0.071 28.586);
--ring: oklch(0.592 0.004 129.198);
--chart-1: oklch(0.592 0.004 129.198);
--chart-2: oklch(0.943 0.008 129.211);
--chart-3: oklch(0.943 0.008 129.211);
--chart-4: oklch(0.965 0.005 129.178);
--chart-5: oklch(0.599 0.016 129.412);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.141 0.016 128.29);
--foreground: oklch(0.979 0.003 129.163);
--muted: oklch(0.177 0.012 129.864);
--muted-foreground: oklch(0.729 0.022 129.455);
--popover: oklch(0.141 0.016 128.29);
--popover-foreground: oklch(0.979 0.003 129.163);
--card: oklch(0.157 0.018 129.315);
--card-foreground: oklch(0.986 0.002 129.151);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.592 0.004 129.198);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.297 0.026 130.115);
--secondary-foreground: oklch(0.832 0.031 129.523);
--accent: oklch(0.297 0.026 130.115);
--accent-foreground: oklch(0.832 0.031 129.523);
--destructive: oklch(0.612 0.232 31.205);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.592 0.004 129.198);
--chart-1: oklch(0.592 0.004 129.198);
--chart-2: oklch(0.297 0.026 130.115);
--chart-3: oklch(0.297 0.026 130.115);
--chart-4: oklch(0.33 0.03 130.155);
--chart-5: oklch(0.599 0.016 129.412);
}