Porter is a shadcn/ui theme built around a muted purple primary color (#ba9fbc) with muted green accents (#a1bc9f). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted purple primary (#ba9fbc) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #000000black | #ffffffwhite |
| Card | #ffffffwhite | #000000black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #ffffffwhite | #000000black |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #ba9fbcdarkgray | #ba9fbcdarkgray |
| Primary foreground | #171118black | #171118black |
| Secondary | #a1bc9fdarkgray | #a1bc9fdarkgray |
| Secondary foreground | #111811black | #111811black |
| Muted | #dfe8degainsboro | #182117black |
| Muted foreground | #656765dimgray | #989a98darkgray |
| Accent | #a1bc9fdarkgray | #a1bc9fdarkgray |
| Accent foreground | #111811black | #111811black |
| Destructive | #a21a10firebrick | #e32416crimson |
| Destructive foreground | #fde9e8linen | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #ba9fbcdarkgray | #ba9fbcdarkgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 7.74:1 | AAA |
| Secondary button | 8.78:1 | AAA |
| Muted text | 4.54:1 | AA |
| Accent | 8.78:1 | AAA |
| Destructive | 6.66:1 | AA |
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 7.74:1 | AAA |
| Secondary button | 8.78:1 | AAA |
| Muted text | 5.83:1 | AA |
| Accent | 8.78:1 | AAA |
| Destructive | 4.61:1 | AA |
Paste this into your globals.css to use Porter in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0 0 0);
--muted: oklch(0.921 0.017 143.05);
--muted-foreground: oklch(0.512 0.004 143.099);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0 0 0);
--card: oklch(1 0 180);
--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.735 0.051 323.448);
--primary-foreground: oklch(0.188 0.018 323.557);
--secondary: oklch(0.767 0.051 142.822);
--secondary-foreground: oklch(0.2 0.018 142.714);
--accent: oklch(0.767 0.051 142.822);
--accent-foreground: oklch(0.2 0.018 142.714);
--destructive: oklch(0.46 0.172 29.57);
--destructive-foreground: oklch(0.95 0.021 22.478);
--ring: oklch(0.735 0.051 323.448);
--chart-1: oklch(0.735 0.051 323.448);
--chart-2: oklch(0.767 0.051 142.822);
--chart-3: oklch(0.767 0.051 142.822);
--chart-4: oklch(0.789 0.046 142.861);
--chart-5: oklch(0.733 0.06 323.499);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(1 0 180);
--muted: oklch(0.236 0.023 142.664);
--muted-foreground: oklch(0.684 0.004 143.11);
--popover: oklch(0 0 0);
--popover-foreground: oklch(1 0 180);
--card: oklch(0 0 0);
--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.735 0.051 323.448);
--primary-foreground: oklch(0.188 0.018 323.557);
--secondary: oklch(0.767 0.051 142.822);
--secondary-foreground: oklch(0.2 0.018 142.714);
--accent: oklch(0.767 0.051 142.822);
--accent-foreground: oklch(0.2 0.018 142.714);
--destructive: oklch(0.588 0.224 29.663);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.735 0.051 323.448);
--chart-1: oklch(0.735 0.051 323.448);
--chart-2: oklch(0.767 0.051 142.822);
--chart-3: oklch(0.767 0.051 142.822);
--chart-4: oklch(0.789 0.046 142.861);
--chart-5: oklch(0.733 0.06 323.499);
}