Rural is a shadcn/ui theme built around a muted deep violet primary color (#1f1825) with muted deep green accents (#1e2518). The light mode uses a neutral background (#faf7fc). Dark mode keeps the muted deep violet primary (#1f1825) on a violet-tinted background (#0a0510).
| Token | Light | Dark |
|---|---|---|
| Background | #faf7fcghostwhite | #0a0510black |
| Foreground | #000000black | #ffffffwhite |
| Card | #f7f4fbghostwhite | #0d0614black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #f7f4fbghostwhite | #0d0614black |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #1f1825black | #1f1825black |
| Primary foreground | #b8a9c7silver | #b8a9c7silver |
| Secondary | #1e2518black | #1e2518black |
| Secondary foreground | #b7c7a9silver | #b7c7a9silver |
| Muted | #dee4d7gainsboro | #21281bblack |
| Muted foreground | #424242darkslategray | #bdbdbdsilver |
| Accent | #1e2518black | #1e2518black |
| Accent foreground | #b7c7a9silver | #b7c7a9silver |
| Destructive | #b12b02firebrick | #e83802orangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #1f1825black | #1f1825black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.82:1 | AAA |
| Text on card | 19.25:1 | AAA |
| Primary button | 7.84:1 | AAA |
| Secondary button | 8.80:1 | AAA |
| Muted text | 7.76:1 | AAA |
| Accent | 8.80:1 | AAA |
| Destructive | 6.55:1 | AA |
| Text on background | 20.17:1 | AAA |
| Text on card | 19.95:1 | AAA |
| Primary button | 7.84:1 | AAA |
| Secondary button | 8.80:1 | AAA |
| Muted text | 8.09:1 | AAA |
| Accent | 8.80:1 | AAA |
| Destructive | 4.19:1 | AA Large |
Paste this into your globals.css to use Rural in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.981 0.007 309.049);
--foreground: oklch(0 0 0);
--muted: oklch(0.911 0.019 129.35);
--muted-foreground: oklch(0.38 0 180);
--popover: oklch(0.971 0.011 309.01);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.971 0.011 309.01);
--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.224 0.026 307.881);
--primary-foreground: oklch(0.756 0.046 308.494);
--secondary: oklch(0.254 0.025 130.249);
--secondary-foreground: oklch(0.808 0.045 129.724);
--accent: oklch(0.254 0.025 130.249);
--accent-foreground: oklch(0.808 0.045 129.724);
--destructive: oklch(0.499 0.176 34.617);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.224 0.026 307.881);
--chart-1: oklch(0.224 0.026 307.881);
--chart-2: oklch(0.254 0.025 130.249);
--chart-3: oklch(0.254 0.025 130.249);
--chart-4: oklch(0.289 0.03 130.323);
--chart-5: oklch(0.222 0.03 307.685);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.13 0.028 308.933);
--foreground: oklch(1 0 180);
--muted: oklch(0.265 0.026 130.222);
--muted-foreground: oklch(0.797 0 180);
--popover: oklch(0.141 0.032 307.594);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.141 0.032 307.594);
--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.224 0.026 307.881);
--primary-foreground: oklch(0.756 0.046 308.494);
--secondary: oklch(0.254 0.025 130.249);
--secondary-foreground: oklch(0.808 0.045 129.724);
--accent: oklch(0.254 0.025 130.249);
--accent-foreground: oklch(0.808 0.045 129.724);
--destructive: oklch(0.61 0.218 34.112);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.224 0.026 307.881);
--chart-1: oklch(0.224 0.026 307.881);
--chart-2: oklch(0.254 0.025 130.249);
--chart-3: oklch(0.254 0.025 130.249);
--chart-4: oklch(0.289 0.03 130.323);
--chart-5: oklch(0.222 0.03 307.685);
}