Diplomacy for shadcn/ui

Diplomacy is a shadcn/ui theme built around a near-white primary color (#faf9fb) with near-white accents (#f9fbfa). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-white primary (#faf9fb) on a neutral background (#060208).

Color palette

TokenLightDark
Background
#ffffffwhite
#060208black
Foreground
#09030cblack
#faf9fbghostwhite
Card
#ffffffwhite
#060208black
Card foreground
#09030cblack
#faf9fbghostwhite
Popover
#ffffffwhite
#060208black
Popover foreground
#09030cblack
#faf9fbghostwhite
Primary
#faf9fbghostwhite
#faf9fbghostwhite
Primary foreground
#66526fdimgray
#66526fdimgray
Secondary
#fbfaf9snow
#fbfaf9snow
Secondary foreground
#353027darkslategray
#353027darkslategray
Muted
#f0eeealinen
#15130fblack
Muted foreground
#5f5a4edimgray
#b1aba0darkgray
Accent
#f9fbfamintcream
#f9fbfamintcream
Accent foreground
#273530darkslategray
#273530darkslategray
Destructive
#7f260asaddlebrown
#ec4918orangered
Destructive foreground
#facfc2peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#faf9fbghostwhite
#faf9fbghostwhite

Contrast

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

Light mode
Text on background20.38:1AAA
Text on card20.38:1AAA
Primary button6.67:1AA
Secondary button12.57:1AAA
Muted text5.92:1AA
Accent12.31:1AAA
Destructive6.75:1AA
Dark mode
Text on background19.58:1AAA
Text on card19.58:1AAA
Primary button6.67:1AA
Secondary button12.57:1AAA
Muted text8.14:1AAA
Accent12.31:1AAA
Destructive3.78:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.12 0.026 317.046);
  --muted: oklch(0.95 0.005 86.028);
  --muted-foreground: oklch(0.469 0.02 86.095);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.12 0.026 317.046);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.12 0.026 317.046);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.984 0.002 315.418);
  --primary-foreground: oklch(0.471 0.052 314.958);
  --secondary: oklch(0.986 0.001 86.012);
  --secondary-foreground: oklch(0.312 0.017 86.077);
  --accent: oklch(0.986 0.002 175.564);
  --accent-foreground: oklch(0.314 0.02 173.609);
  --destructive: oklch(0.404 0.129 36.081);
  --destructive-foreground: oklch(0.888 0.052 37.593);
  --ring: oklch(0.984 0.002 315.418);
  --chart-1: oklch(0.984 0.002 315.418);
  --chart-2: oklch(0.986 0.001 86.012);
  --chart-3: oklch(0.986 0.002 175.564);
  --chart-4: oklch(1.007 0.001 266.003);
  --chart-5: oklch(0.984 0.003 315.416);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.105 0.022 317.24);
  --foreground: oklch(0.984 0.002 315.417);
  --muted: oklch(0.187 0.008 86.095);
  --muted-foreground: oklch(0.744 0.018 86.08);
  --popover: oklch(0.105 0.022 317.24);
  --popover-foreground: oklch(0.984 0.002 315.417);
  --card: oklch(0.105 0.022 317.24);
  --card-foreground: oklch(0.984 0.002 315.417);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.984 0.002 315.418);
  --primary-foreground: oklch(0.471 0.052 314.958);
  --secondary: oklch(0.986 0.001 86.012);
  --secondary-foreground: oklch(0.312 0.017 86.077);
  --accent: oklch(0.986 0.002 175.564);
  --accent-foreground: oklch(0.314 0.02 173.609);
  --destructive: oklch(0.634 0.207 35.747);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.984 0.002 315.418);
  --chart-1: oklch(0.984 0.002 315.418);
  --chart-2: oklch(0.986 0.001 86.012);
  --chart-3: oklch(0.986 0.002 175.564);
  --chart-4: oklch(1.007 0.001 266.003);
  --chart-5: oklch(0.984 0.003 315.416);
}