Rain is a shadcn/ui theme built around a muted deep purple primary color (#352537) with muted deep green accents (#273725). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep purple primary (#352537) on a purple-tinted background (#0a040b).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #0a040bblack |
| Foreground | #140317black | #ffffffwhite |
| Card | #fcfcfcsnow | #0e050fblack |
| Card foreground | #100212black | #ffffffwhite |
| Popover | #fcfcfcsnow | #0e050fblack |
| Popover foreground | #100212black | #ffffffwhite |
| Primary | #352537darkslategray | #352537darkslategray |
| Primary foreground | #cfbcd2thistle | #cfbcd2thistle |
| Secondary | #273725darkslategray | #273725darkslategray |
| Secondary foreground | #bfd2bcsilver | #bfd2bcsilver |
| Muted | #d5ead2gainsboro | #182d15black |
| Muted foreground | #495846darkslategray | #aab9a7darkgray |
| Accent | #273725darkslategray | #273725darkslategray |
| Accent foreground | #bfd2bcsilver | #bfd2bcsilver |
| Destructive | #ae4713sienna | #e86a2cchocolate |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #352537darkslategray | #352537darkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.90:1 | AAA |
| Text on card | 19.76:1 | AAA |
| Primary button | 8.03:1 | AAA |
| Secondary button | 7.92:1 | AAA |
| Muted text | 5.96:1 | AA |
| Accent | 7.92:1 | AAA |
| Destructive | 5.64:1 | AA |
| Text on background | 20.28:1 | AAA |
| Text on card | 20.03:1 | AAA |
| Primary button | 8.03:1 | AAA |
| Secondary button | 7.92:1 | AAA |
| Muted text | 7.15:1 | AAA |
| Accent | 7.92:1 | AAA |
| Destructive | 6.53:1 | AA |
Paste this into your globals.css to use Rain in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.146 0.052 322.802);
--muted: oklch(0.915 0.039 141.473);
--muted-foreground: oklch(0.441 0.034 141.378);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.133 0.046 323.143);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.133 0.046 323.143);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.29 0.039 321.939);
--primary-foreground: oklch(0.817 0.038 321.719);
--secondary: oklch(0.317 0.038 141.261);
--secondary-foreground: oklch(0.843 0.037 141.468);
--accent: oklch(0.317 0.038 141.261);
--accent-foreground: oklch(0.843 0.037 141.468);
--destructive: oklch(0.529 0.148 42.619);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.29 0.039 321.939);
--chart-1: oklch(0.29 0.039 321.939);
--chart-2: oklch(0.317 0.038 141.261);
--chart-3: oklch(0.317 0.038 141.261);
--chart-4: oklch(0.35 0.043 141.252);
--chart-5: oklch(0.289 0.045 321.981);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.124 0.024 322.989);
--foreground: oklch(1 0 180);
--muted: oklch(0.273 0.05 141.126);
--muted-foreground: oklch(0.768 0.03 141.484);
--popover: oklch(0.137 0.028 322.501);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.137 0.028 322.501);
--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.29 0.039 321.939);
--primary-foreground: oklch(0.817 0.038 321.719);
--secondary: oklch(0.317 0.038 141.261);
--secondary-foreground: oklch(0.843 0.037 141.468);
--accent: oklch(0.317 0.038 141.261);
--accent-foreground: oklch(0.843 0.037 141.468);
--destructive: oklch(0.668 0.172 43.964);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.29 0.039 321.939);
--chart-1: oklch(0.29 0.039 321.939);
--chart-2: oklch(0.317 0.038 141.261);
--chart-3: oklch(0.317 0.038 141.261);
--chart-4: oklch(0.35 0.043 141.252);
--chart-5: oklch(0.289 0.045 321.981);
}