Polite is a shadcn/ui theme built around a deep teal primary color (#123f31) with deep yellow accents (#3f3112). The light mode uses a neutral background (#f8fcfb). Dark mode keeps the deep teal primary (#123f31) on a neutral background (#030706).
| Token | Light | Dark |
|---|---|---|
| Background | #f8fcfbmintcream | #030706black |
| Foreground | #03110dblack | #ffffffwhite |
| Card | #f8fcfbmintcream | #030706black |
| Card foreground | #03110dblack | #ffffffwhite |
| Popover | #f8fcfbmintcream | #030706black |
| Popover foreground | #03110dblack | #ffffffwhite |
| Primary | #123f31darkslategray | #123f31darkslategray |
| Primary foreground | #a0e3cepowderblue | #a0e3cepowderblue |
| Secondary | #31123fmidnightblue | #31123fmidnightblue |
| Secondary foreground | #cea0e3plum | #cea0e3plum |
| Muted | #e5dde9gainsboro | #1e1622black |
| Muted foreground | #655f67dimgray | #9d98a0darkgray |
| Accent | #3f3112darkolivegreen | #3f3112darkolivegreen |
| Accent foreground | #e3cea0palegoldenrod | #e3cea0palegoldenrod |
| Destructive | #950f0fdarkred | #e92020crimson |
| Destructive foreground | #fbdadamistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #123f31darkslategray | #123f31darkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.64:1 | AAA |
| Text on card | 18.64:1 | AAA |
| Primary button | 8.04:1 | AAA |
| Secondary button | 7.55:1 | AAA |
| Muted text | 4.69:1 | AA |
| Accent | 8.18:1 | AAA |
| Destructive | 6.89:1 | AA |
| Text on background | 20.23:1 | AAA |
| Text on card | 20.23:1 | AAA |
| Primary button | 8.04:1 | AAA |
| Secondary button | 7.55:1 | AAA |
| Muted text | 6.21:1 | AA |
| Accent | 8.18:1 | AAA |
| Destructive | 4.47:1 | AA Large |
Paste this into your globals.css to use Polite in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.988 0.005 175.458);
--foreground: oklch(0.163 0.024 172.596);
--muted: oklch(0.908 0.017 315.348);
--muted-foreground: oklch(0.495 0.014 315.307);
--popover: oklch(0.988 0.005 175.458);
--popover-foreground: oklch(0.163 0.024 172.596);
--card: oklch(0.988 0.005 175.458);
--card-foreground: oklch(0.163 0.024 172.596);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.333 0.055 168.636);
--primary-foreground: oklch(0.866 0.074 172.8);
--secondary: oklch(0.255 0.086 313.469);
--secondary-foreground: oklch(0.771 0.106 314.835);
--accent: oklch(0.322 0.05 84.319);
--accent-foreground: oklch(0.858 0.065 85.994);
--destructive: oklch(0.426 0.165 28.063);
--destructive-foreground: oklch(0.916 0.037 17.853);
--ring: oklch(0.333 0.055 168.636);
--chart-1: oklch(0.333 0.055 168.636);
--chart-2: oklch(0.255 0.086 313.469);
--chart-3: oklch(0.322 0.05 84.319);
--chart-4: oklch(0.283 0.099 313.341);
--chart-5: oklch(0.337 0.057 168.269);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.122 0.011 175.781);
--foreground: oklch(1 0 180);
--muted: oklch(0.217 0.024 314.949);
--muted-foreground: oklch(0.685 0.013 315.347);
--popover: oklch(0.122 0.011 175.781);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.122 0.011 175.781);
--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.333 0.055 168.636);
--primary-foreground: oklch(0.866 0.074 172.8);
--secondary: oklch(0.255 0.086 313.469);
--secondary-foreground: oklch(0.771 0.106 314.835);
--accent: oklch(0.322 0.05 84.319);
--accent-foreground: oklch(0.858 0.065 85.994);
--destructive: oklch(0.597 0.23 27.904);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.333 0.055 168.636);
--chart-1: oklch(0.333 0.055 168.636);
--chart-2: oklch(0.255 0.086 313.469);
--chart-3: oklch(0.322 0.05 84.319);
--chart-4: oklch(0.283 0.099 313.341);
--chart-5: oklch(0.337 0.057 168.269);
}