Fairness is a shadcn/ui theme built around an indigo primary color (#35328f) with green accents (#328f35). The light mode uses a neutral background (#fcfbfd). Dark mode keeps the indigo primary (#35328f) on a neutral background (#030307).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfbfdsnow | #030307black |
| Foreground | #03030dblack | #ffffffwhite |
| Card | #f8f8fcghostwhite | #05050bblack |
| Card foreground | #020209black | #ffffffwhite |
| Popover | #fcfbfdsnow | #030307black |
| Popover foreground | #03030dblack | #ffffffwhite |
| Primary | #35328fdarkslateblue | #35328fdarkslateblue |
| Primary foreground | #f8f7fcghostwhite | #f8f7fcghostwhite |
| Secondary | #8f3532brown | #8f3532brown |
| Secondary foreground | #fcf8f7snow | #fcf8f7snow |
| Muted | #e8dedegainsboro | #211717black |
| Muted foreground | #454040darkslategray | #bfbabasilver |
| Accent | #328f35forestgreen | #328f35forestgreen |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #8b1809darkred | #f2432ctomato |
| Destructive foreground | #fcd0capink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #35328fdarkslateblue | #35328fdarkslateblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.94:1 | AAA |
| Text on card | 19.51:1 | AAA |
| Primary button | 9.77:1 | AAA |
| Secondary button | 7.26:1 | AAA |
| Muted text | 7.73:1 | AAA |
| Accent | 4.08:1 | AA Large |
| Destructive | 6.72:1 | AA |
| Text on background | 20.56:1 | AAA |
| Text on card | 20.35:1 | AAA |
| Primary button | 9.77:1 | AAA |
| Secondary button | 7.26:1 | AAA |
| Muted text | 9.11:1 | AAA |
| Accent | 4.08:1 | AA Large |
| Destructive | 3.74:1 | AA Large |
Paste this into your globals.css to use Fairness in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.003 287.891);
--foreground: oklch(0.103 0.03 282.178);
--muted: oklch(0.909 0.011 19.781);
--muted-foreground: oklch(0.376 0.007 19.873);
--popover: oklch(0.99 0.003 287.891);
--popover-foreground: oklch(0.103 0.03 282.178);
--card: oklch(0.98 0.005 287.84);
--card-foreground: oklch(0.09 0.026 282.311);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.383 0.149 278.201);
--primary-foreground: oklch(0.979 0.006 287.817);
--secondary: oklch(0.458 0.123 25.145);
--secondary-foreground: oklch(0.982 0.005 19.678);
--accent: oklch(0.576 0.154 143.745);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.413 0.152 31.013);
--destructive-foreground: oklch(0.894 0.05 26.914);
--ring: oklch(0.383 0.149 278.201);
--chart-1: oklch(0.383 0.149 278.201);
--chart-2: oklch(0.458 0.123 25.145);
--chart-3: oklch(0.576 0.154 143.745);
--chart-4: oklch(0.483 0.131 25.209);
--chart-5: oklch(0.379 0.157 277.285);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.103 0.014 285.634);
--foreground: oklch(1 0 180);
--muted: oklch(0.218 0.017 20.808);
--muted-foreground: oklch(0.794 0.006 19.708);
--popover: oklch(0.103 0.014 285.634);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.117 0.016 285.63);
--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.383 0.149 278.201);
--primary-foreground: oklch(0.979 0.006 287.817);
--secondary: oklch(0.458 0.123 25.145);
--secondary-foreground: oklch(0.982 0.005 19.678);
--accent: oklch(0.576 0.154 143.745);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.638 0.214 30.952);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.383 0.149 278.201);
--chart-1: oklch(0.383 0.149 278.201);
--chart-2: oklch(0.458 0.123 25.145);
--chart-3: oklch(0.576 0.154 143.745);
--chart-4: oklch(0.483 0.131 25.209);
--chart-5: oklch(0.379 0.157 277.285);
}