Consensus is a shadcn/ui theme built around a near-white primary color (#fafcff) with near-white accents (#fcfffa). The light mode uses a neutral background (#fbfcfe). Dark mode keeps the near-white primary (#fafcff) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfcfewhite | #000000black |
| Foreground | #020508black | #f6f7f9whitesmoke |
| Card | #fbfcfewhite | #000000black |
| Card foreground | #020508black | #f6f7f9whitesmoke |
| Popover | #fbfcfewhite | #000000black |
| Popover foreground | #020508black | #f6f7f9whitesmoke |
| Primary | #fafcffghostwhite | #fafcffghostwhite |
| Primary foreground | #1261b5steelblue | #1261b5steelblue |
| Secondary | #fffafcsnow | #fffafcsnow |
| Secondary foreground | #b51261mediumvioletred | #b51261mediumvioletred |
| Muted | #eee3e8linen | #1c1117black |
| Muted foreground | #67515bdimgray | #ae98a3darkgray |
| Accent | #fcfffawhite | #fcfffawhite |
| Accent foreground | #2f5809darkgreen | #2f5809darkgreen |
| Destructive | #ca3507firebrick | #dd3a08orangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #fafcffghostwhite | #fafcffghostwhite |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.94:1 | AAA |
| Text on card | 19.94:1 | AAA |
| Primary button | 6.02:1 | AA |
| Secondary button | 6.31:1 | AA |
| Muted text | 5.75:1 | AA |
| Accent | 8.24:1 | AAA |
| Destructive | 5.23:1 | AA |
| Text on background | 19.59:1 | AAA |
| Text on card | 19.59:1 | AAA |
| Primary button | 6.02:1 | AA |
| Secondary button | 6.31:1 | AA |
| Muted text | 6.82:1 | AA |
| Accent | 8.24:1 | AAA |
| Destructive | 4.47:1 | AA Large |
Paste this into your globals.css to use Consensus in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.992 0.003 249.676);
--foreground: oklch(0.111 0.015 240.156);
--muted: oklch(0.925 0.014 346.412);
--muted-foreground: oklch(0.46 0.033 347.853);
--popover: oklch(0.992 0.003 249.676);
--popover-foreground: oklch(0.111 0.015 240.156);
--card: oklch(0.992 0.003 249.676);
--card-foreground: oklch(0.111 0.015 240.156);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.991 0.004 249.684);
--primary-foreground: oklch(0.495 0.151 254.797);
--secondary: oklch(0.99 0.005 346.156);
--secondary-foreground: oklch(0.507 0.197 359.887);
--accent: oklch(0.996 0.006 129.189);
--accent-foreground: oklch(0.415 0.114 134.253);
--destructive: oklch(0.554 0.192 34.758);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.991 0.004 249.684);
--chart-1: oklch(0.991 0.004 249.684);
--chart-2: oklch(0.99 0.005 346.156);
--chart-3: oklch(0.996 0.006 129.189);
--chart-4: oklch(1.02 0.01 165.748);
--chart-5: oklch(0.991 0.004 249.686);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.977 0.002 249.671);
--muted: oklch(0.197 0.021 348.646);
--muted-foreground: oklch(0.703 0.03 347.113);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.977 0.002 249.671);
--card: oklch(0 0 0);
--card-foreground: oklch(0.977 0.002 249.671);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.991 0.004 249.684);
--primary-foreground: oklch(0.495 0.151 254.797);
--secondary: oklch(0.99 0.005 346.156);
--secondary-foreground: oklch(0.507 0.197 359.887);
--accent: oklch(0.996 0.006 129.189);
--accent-foreground: oklch(0.415 0.114 134.253);
--destructive: oklch(0.593 0.206 34.633);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.991 0.004 249.684);
--chart-1: oklch(0.991 0.004 249.684);
--chart-2: oklch(0.99 0.005 346.156);
--chart-3: oklch(0.996 0.006 129.189);
--chart-4: oklch(1.02 0.01 165.748);
--chart-5: oklch(0.991 0.004 249.686);
}