Polite is a shadcn/ui theme built around a near-white primary color (#eff0f0) with near-white accents (#eff0f0). The light mode uses a neutral background (#fbfefe). Dark mode keeps the near-white primary (#eff0f0) on a neutral background (#020403).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfefewhite | #020403black |
| Foreground | #031211black | #f9fbfbghostwhite |
| Card | #f7fdfcmintcream | #030707black |
| Card foreground | #020d0dblack | #fcfdfdwhite |
| Popover | #f7fdfcmintcream | #030707black |
| Popover foreground | #020d0dblack | #fcfdfdwhite |
| Primary | #eff0f0whitesmoke | #eff0f0whitesmoke |
| Primary foreground | #525b5bdimgray | #525b5bdimgray |
| Secondary | #eff0f0whitesmoke | #eff0f0whitesmoke |
| Secondary foreground | #525b56dimgray | #525b56dimgray |
| Muted | #eef6f2whitesmoke | #09110cblack |
| Muted foreground | #454a47darkslategray | #b5bab7silver |
| Accent | #eff0f0whitesmoke | #eff0f0whitesmoke |
| Accent foreground | #52575bdimgray | #52575bdimgray |
| Destructive | #ad3e0bsaddlebrown | #f16727chocolate |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #eff0f0whitesmoke | #eff0f0whitesmoke |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.83:1 | AAA |
| Text on card | 19.11:1 | AAA |
| Primary button | 6.13:1 | AA |
| Secondary button | 6.16:1 | AA |
| Muted text | 8.23:1 | AAA |
| Accent | 6.39:1 | AA |
| Destructive | 6.06:1 | AA |
| Text on background | 19.84:1 | AAA |
| Text on card | 19.85:1 | AAA |
| Primary button | 6.13:1 | AA |
| Secondary button | 6.16:1 | AA |
| Muted text | 9.73:1 | AAA |
| Accent | 6.39:1 | AA |
| Destructive | 6.72:1 | AA |
Paste this into your globals.css to use Polite in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.003 193.549);
--foreground: oklch(0.166 0.023 191.312);
--muted: oklch(0.967 0.01 162.349);
--muted-foreground: oklch(0.404 0.009 162.053);
--popover: oklch(0.989 0.006 193.491);
--popover-foreground: oklch(0.147 0.02 191.786);
--card: oklch(0.989 0.006 193.491);
--card-foreground: oklch(0.147 0.02 191.786);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.955 0.002 193.573);
--primary-foreground: oklch(0.464 0.011 193.143);
--secondary: oklch(0.955 0.002 162.567);
--secondary-foreground: oklch(0.462 0.013 161.89);
--accent: oklch(0.954 0.001 242.212);
--accent-foreground: oklch(0.454 0.009 242.45);
--destructive: oklch(0.514 0.155 40.269);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.955 0.002 193.573);
--chart-1: oklch(0.955 0.002 193.573);
--chart-2: oklch(0.955 0.002 162.567);
--chart-3: oklch(0.954 0.001 242.212);
--chart-4: oklch(0.978 0.001 162.594);
--chart-5: oklch(0.956 0.003 193.553);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.097 0.008 192.72);
--foreground: oklch(0.987 0.003 193.555);
--muted: oklch(0.167 0.016 160.185);
--muted-foreground: oklch(0.785 0.008 162.374);
--popover: oklch(0.123 0.01 192.72);
--popover-foreground: oklch(0.993 0.001 193.581);
--card: oklch(0.123 0.01 192.72);
--card-foreground: oklch(0.993 0.001 193.581);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.955 0.002 193.573);
--primary-foreground: oklch(0.464 0.011 193.143);
--secondary: oklch(0.955 0.002 162.567);
--secondary-foreground: oklch(0.462 0.013 161.89);
--accent: oklch(0.954 0.001 242.212);
--accent-foreground: oklch(0.454 0.009 242.45);
--destructive: oklch(0.678 0.185 42.107);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.955 0.002 193.573);
--chart-1: oklch(0.955 0.002 193.573);
--chart-2: oklch(0.955 0.002 162.567);
--chart-3: oklch(0.954 0.001 242.212);
--chart-4: oklch(0.978 0.001 162.594);
--chart-5: oklch(0.956 0.003 193.553);
}