Pub is a shadcn/ui theme built around a violet primary color (#5e2484) with teal accents (#24845e). The light mode uses a neutral background (#fdfcfd). Dark mode keeps the violet primary (#5e2484) on a neutral background (#060208).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfcfdwhite | #060208black |
| Foreground | #000000black | #ffffffwhite |
| Card | #fdfcfdwhite | #060208black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #fdfcfdwhite | #060208black |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #5e2484rebeccapurple | #5e2484rebeccapurple |
| Primary foreground | #efe3f7lavender | #efe3f7lavender |
| Secondary | #845e24saddlebrown | #845e24saddlebrown |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #e0dedcgainsboro | #23211fblack |
| Muted foreground | #43403ddarkslategray | #c2c0bcsilver |
| Accent | #24845eseagreen | #24845eseagreen |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #750601maroon | #fe1c10red |
| Destructive foreground | #ffada9lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #5e2484rebeccapurple | #5e2484rebeccapurple |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.45:1 | AAA |
| Text on card | 20.45:1 | AAA |
| Primary button | 8.24:1 | AAA |
| Secondary button | 5.83:1 | AA |
| Muted text | 7.67:1 | AAA |
| Accent | 4.62:1 | AA |
| Destructive | 6.62:1 | AA |
| Text on background | 20.58:1 | AAA |
| Text on card | 20.58:1 | AAA |
| Primary button | 8.24:1 | AAA |
| Secondary button | 5.83:1 | AA |
| Muted text | 8.79:1 | AAA |
| Accent | 4.62:1 | AA |
| Destructive | 3.90:1 | AA Large |
Paste this into your globals.css to use Pub in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.002 312.34);
--foreground: oklch(0 0 0);
--muted: oklch(0.902 0.003 78.302);
--muted-foreground: oklch(0.374 0.007 78.239);
--popover: oklch(0.991 0.002 312.34);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.991 0.002 312.34);
--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.395 0.155 308.285);
--primary-foreground: oklch(0.931 0.03 312.118);
--secondary: oklch(0.51 0.089 74.153);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.549 0.107 162.033);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.356 0.141 30.156);
--destructive-foreground: oklch(0.825 0.097 22.701);
--ring: oklch(0.395 0.155 308.285);
--chart-1: oklch(0.395 0.155 308.285);
--chart-2: oklch(0.51 0.089 74.153);
--chart-3: oklch(0.549 0.107 162.033);
--chart-4: oklch(0.543 0.095 74.05);
--chart-5: oklch(0.395 0.161 307.961);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.103 0.024 314.284);
--foreground: oklch(1 0 180);
--muted: oklch(0.25 0.004 78.252);
--muted-foreground: oklch(0.808 0.006 78.289);
--popover: oklch(0.103 0.024 314.284);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.103 0.024 314.284);
--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.395 0.155 308.285);
--primary-foreground: oklch(0.931 0.03 312.118);
--secondary: oklch(0.51 0.089 74.153);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.549 0.107 162.033);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.633 0.25 29.462);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.395 0.155 308.285);
--chart-1: oklch(0.395 0.155 308.285);
--chart-2: oklch(0.51 0.089 74.153);
--chart-3: oklch(0.549 0.107 162.033);
--chart-4: oklch(0.543 0.095 74.05);
--chart-5: oklch(0.395 0.161 307.961);
}