Coarse is a shadcn/ui theme built around a muted deep green primary color (#2a2f1e) with muted deep green accents (#212f1e). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep green primary (#2a2f1e) on a neutral background (#030401).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #030401black |
| Foreground | #101505black | #fbfbf8snow |
| Card | #fcfcfcsnow | #060802black |
| Card foreground | #0d1104black | #fdfdfcwhite |
| Popover | #ffffffwhite | #030401black |
| Popover foreground | #101505black | #fbfbf8snow |
| Primary | #2a2f1edarkslategray | #2a2f1edarkslategray |
| Primary foreground | #c5cdb1silver | #c5cdb1silver |
| Secondary | #2f2b1edarkslategray | #2f2b1edarkslategray |
| Secondary foreground | #cdc7b1silver | #cdc7b1silver |
| Muted | #f5f4efwhitesmoke | #100e0ablack |
| Muted foreground | #5a5544darkolivegreen | #bbb6a5darkgray |
| Accent | #212f1edarkslategray | #212f1edarkslategray |
| Accent foreground | #b7cdb1silver | #b7cdb1silver |
| Destructive | #ba4512firebrick | #d14d15chocolate |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #2a2f1edarkslategray | #2a2f1edarkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.55:1 | AAA |
| Text on card | 18.69:1 | AAA |
| Primary button | 8.39:1 | AAA |
| Secondary button | 8.35:1 | AAA |
| Muted text | 6.76:1 | AA |
| Accent | 8.33:1 | AAA |
| Destructive | 5.34:1 | AA |
| Text on background | 19.81:1 | AAA |
| Text on card | 19.75:1 | AAA |
| Primary button | 8.39:1 | AAA |
| Secondary button | 8.35:1 | AAA |
| Muted text | 9.49:1 | AAA |
| Accent | 8.33:1 | AAA |
| Destructive | 4.39:1 | AA Large |
Paste this into your globals.css to use Coarse in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.185 0.032 121.892);
--muted: oklch(0.966 0.006 93.932);
--muted-foreground: oklch(0.45 0.028 94.392);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.185 0.032 121.892);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.168 0.028 121.069);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.294 0.03 121.103);
--primary-foreground: oklch(0.835 0.039 120.112);
--secondary: oklch(0.289 0.023 94.471);
--secondary-foreground: oklch(0.829 0.031 94.222);
--accent: oklch(0.286 0.035 138.979);
--accent-foreground: oklch(0.825 0.045 138.916);
--destructive: oklch(0.544 0.162 39.885);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.294 0.03 121.103);
--chart-1: oklch(0.294 0.03 121.103);
--chart-2: oklch(0.289 0.023 94.471);
--chart-3: oklch(0.286 0.035 138.979);
--chart-4: oklch(0.323 0.027 94.48);
--chart-5: oklch(0.297 0.033 121.324);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.103 0.015 119.277);
--foreground: oklch(0.988 0.004 119.371);
--muted: oklch(0.165 0.009 94.345);
--muted-foreground: oklch(0.776 0.025 94.178);
--popover: oklch(0.103 0.015 119.277);
--popover-foreground: oklch(0.988 0.004 119.371);
--card: oklch(0.129 0.019 119.277);
--card-foreground: oklch(0.994 0.002 119.337);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.294 0.03 121.103);
--primary-foreground: oklch(0.835 0.039 120.112);
--secondary: oklch(0.289 0.023 94.471);
--secondary-foreground: oklch(0.829 0.031 94.222);
--accent: oklch(0.286 0.035 138.979);
--accent-foreground: oklch(0.825 0.045 138.916);
--destructive: oklch(0.593 0.178 39.727);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.294 0.03 121.103);
--chart-1: oklch(0.294 0.03 121.103);
--chart-2: oklch(0.289 0.023 94.471);
--chart-3: oklch(0.286 0.035 138.979);
--chart-4: oklch(0.323 0.027 94.48);
--chart-5: oklch(0.297 0.033 121.324);
}