Polite for shadcn/ui

Polite is a shadcn/ui theme built around a muted light green primary color (#dee3d9) with muted light violet accents (#ded9e3). The light mode uses a neutral background (#fafdf7). Dark mode keeps the muted light green primary (#dee3d9) on a green-tinted background (#0b0f06).

Color palette

TokenLightDark
Background
#fafdf7mintcream
#0b0f06black
Foreground
#080c03black
#fdfdfcwhite
Card
#fafdf7mintcream
#0b0f06black
Card foreground
#080c03black
#fdfdfcwhite
Popover
#fafdf7mintcream
#0b0f06black
Popover foreground
#080c03black
#fdfdfcwhite
Primary
#dee3d9gainsboro
#dee3d9gainsboro
Primary foreground
#464f3bdarkslategray
#464f3bdarkslategray
Secondary
#ded9e3gainsboro
#ded9e3gainsboro
Secondary foreground
#443b4fdarkslategray
#443b4fdarkslategray
Muted
#ddd5e7gainsboro
#21182ablack
Muted foreground
#564b62dimgray
#a89db4darkgray
Accent
#ded9e3gainsboro
#ded9e3gainsboro
Accent foreground
#443b4fdarkslategray
#443b4fdarkslategray
Destructive
#c00a07firebrick
#e20c08red
Destructive foreground
#fffafasnow
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#dee3d9gainsboro
#dee3d9gainsboro

Contrast

WCAG 2 contrast ratios between each background and its foreground color.

Light mode
Text on background19.18:1AAA
Text on card19.18:1AAA
Primary button6.58:1AA
Secondary button7.61:1AAA
Muted text5.70:1AA
Accent7.61:1AAA
Destructive6.17:1AA
Dark mode
Text on background19.03:1AAA
Text on card19.03:1AAA
Primary button6.58:1AA
Secondary button7.61:1AAA
Muted text6.64:1AA
Accent7.61:1AAA
Destructive4.88:1AA

CSS variables

Paste this into your globals.css to use Polite in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.008 127.208);
  --foreground: oklch(0.146 0.023 126.34);
  --muted: oklch(0.884 0.027 306.741);
  --muted-foreground: oklch(0.434 0.039 306.015);
  --popover: oklch(0.99 0.008 127.208);
  --popover-foreground: oklch(0.146 0.023 126.34);
  --card: oklch(0.99 0.008 127.208);
  --card-foreground: oklch(0.146 0.023 126.34);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.909 0.014 127.305);
  --primary-foreground: oklch(0.413 0.035 128.216);
  --secondary: oklch(0.891 0.014 306.915);
  --secondary-foreground: oklch(0.369 0.037 305.881);
  --accent: oklch(0.891 0.014 306.915);
  --accent-foreground: oklch(0.369 0.037 305.881);
  --destructive: oklch(0.51 0.205 29.09);
  --destructive-foreground: oklch(0.989 0.005 18.439);
  --ring: oklch(0.909 0.014 127.305);
  --chart-1: oklch(0.909 0.014 127.305);
  --chart-2: oklch(0.891 0.014 306.915);
  --chart-3: oklch(0.891 0.014 306.915);
  --chart-4: oklch(0.917 0.011 306.966);
  --chart-5: oklch(0.911 0.017 127.343);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.159 0.021 127.607);
  --foreground: oklch(0.994 0.002 127.138);
  --muted: oklch(0.228 0.037 305.069);
  --muted-foreground: oklch(0.712 0.034 306.523);
  --popover: oklch(0.159 0.021 127.607);
  --popover-foreground: oklch(0.994 0.002 127.138);
  --card: oklch(0.159 0.021 127.607);
  --card-foreground: oklch(0.994 0.002 127.138);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.909 0.014 127.305);
  --primary-foreground: oklch(0.413 0.035 128.216);
  --secondary: oklch(0.891 0.014 306.915);
  --secondary-foreground: oklch(0.369 0.037 305.881);
  --accent: oklch(0.891 0.014 306.915);
  --accent-foreground: oklch(0.369 0.037 305.881);
  --destructive: oklch(0.577 0.233 29.12);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.909 0.014 127.305);
  --chart-1: oklch(0.909 0.014 127.305);
  --chart-2: oklch(0.891 0.014 306.915);
  --chart-3: oklch(0.891 0.014 306.915);
  --chart-4: oklch(0.917 0.011 306.966);
  --chart-5: oklch(0.911 0.017 127.343);
}