Office Theme (Word) for shadcn/ui

Office Theme (Word) is a shadcn/ui theme built around a blue primary color (#2c589b) with neutral gray accents (#d9d9d9). The light mode uses a neutral background (#ffffff). Dark mode keeps the blue primary (#2c589b) on a neutral background (#ffffff).

Color palette

TokenLightDark
Background
#ffffffwhite
#ffffffwhite
Foreground
#000000black
#000000black
Card
#fafafasnow
#fafafasnow
Card foreground
#000000black
#000000black
Popover
#f7f7f7whitesmoke
#f7f7f7whitesmoke
Popover foreground
#000000black
#000000black
Primary
#2c589bdarkslateblue
#2c589bdarkslateblue
Primary foreground
#fbfcfewhite
#fbfcfewhite
Secondary
#acbbd2lightsteelblue
#acbbd2lightsteelblue
Secondary foreground
#1b2432darkslategray
#1b2432darkslategray
Muted
#e9e2e2gainsboro
#e9e2e2gainsboro
Muted foreground
#564343darkslategray
#564343darkslategray
Accent
#d9d9d9gainsboro
#d9d9d9gainsboro
Accent foreground
#404040darkslategray
#404040darkslategray
Destructive
#bc230bfirebrick
#bc230bfirebrick
Destructive foreground
#fffbfasnow
#fffbfasnow
Border
#f2f2f2whitesmoke
#f2f2f2whitesmoke
Input
#ebebeblinen
#ebebeblinen
Ring
#2c589bdarkslateblue
#2c589bdarkslateblue

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.10:1AAA
Primary button6.85:1AA
Secondary button8.05:1AAA
Muted text7.22:1AAA
Accent7.32:1AAA
Destructive6.04:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.10:1AAA
Primary button6.85:1AA
Secondary button8.05:1AAA
Muted text7.22:1AAA
Accent7.32:1AAA
Destructive6.04:1AA

CSS variables

Paste this into your globals.css to use Office Theme (Word) in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.919 0.007 17.278);
  --muted-foreground: oklch(0.404 0.025 18.259);
  --popover: oklch(0.977 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.985 0 180);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.962 0 180);
  --input: oklch(0.939 0 180);
  --primary: oklch(0.465 0.119 258.429);
  --primary-foreground: oklch(0.991 0.003 258.319);
  --secondary: oklch(0.789 0.037 258.372);
  --secondary-foreground: oklch(0.258 0.029 258.322);
  --accent: oklch(0.885 0 180);
  --accent-foreground: oklch(0.371 0 168.69);
  --destructive: oklch(0.514 0.191 31.389);
  --destructive-foreground: oklch(0.99 0.004 27.955);
  --ring: oklch(0.465 0.119 258.429);
  --chart-1: oklch(0.465 0.119 258.429);
  --chart-2: oklch(0.789 0.037 258.372);
  --chart-3: oklch(0.885 0 180);
  --chart-4: oklch(0.815 0.032 258.371);
  --chart-5: oklch(0.465 0.125 258.494);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.919 0.007 17.278);
  --muted-foreground: oklch(0.404 0.025 18.259);
  --popover: oklch(0.977 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.985 0 180);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.962 0 180);
  --input: oklch(0.939 0 180);
  --primary: oklch(0.465 0.119 258.429);
  --primary-foreground: oklch(0.991 0.003 258.319);
  --secondary: oklch(0.789 0.037 258.372);
  --secondary-foreground: oklch(0.258 0.029 258.322);
  --accent: oklch(0.885 0 180);
  --accent-foreground: oklch(0.371 0 168.69);
  --destructive: oklch(0.514 0.191 31.389);
  --destructive-foreground: oklch(0.99 0.004 27.955);
  --ring: oklch(0.465 0.119 258.429);
  --chart-1: oklch(0.465 0.119 258.429);
  --chart-2: oklch(0.789 0.037 258.372);
  --chart-3: oklch(0.885 0 180);
  --chart-4: oklch(0.815 0.032 258.371);
  --chart-5: oklch(0.465 0.125 258.494);
}