Office Theme (Access) for shadcn/ui

Office Theme (Access) is a shadcn/ui theme built around a red primary color (#a4373a) with neutral gray accents (#d9d9d9). The light mode uses a neutral background (#ffffff). Dark mode keeps the red primary (#a4373a) 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
#a4373abrown
#a4373abrown
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d2acadsilver
#d2acadsilver
Secondary foreground
#321b1cblack
#321b1cblack
Muted
#e9e2e2gainsboro
#e9e2e2gainsboro
Muted foreground
#564343darkslategray
#564343darkslategray
Accent
#d9d9d9gainsboro
#d9d9d9gainsboro
Accent foreground
#404040darkslategray
#404040darkslategray
Destructive
#771009maroon
#771009maroon
Destructive foreground
#fabcb8lightpink
#fabcb8lightpink
Border
#f2f2f2whitesmoke
#f2f2f2whitesmoke
Input
#ebebeblinen
#ebebeblinen
Ring
#a4373abrown
#a4373abrown

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.57:1AA
Secondary button7.84:1AAA
Muted text7.22:1AAA
Accent7.32:1AAA
Destructive6.97:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.10:1AAA
Primary button6.57:1AA
Secondary button7.84:1AAA
Muted text7.22:1AAA
Accent7.32:1AAA
Destructive6.97:1AA

CSS variables

Paste this into your globals.css to use Office Theme (Access) 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.496 0.144 22.235);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.779 0.045 15.903);
  --secondary-foreground: oklch(0.252 0.037 17.826);
  --accent: oklch(0.885 0 180);
  --accent-foreground: oklch(0.371 0 168.69);
  --destructive: oklch(0.366 0.137 29.564);
  --destructive-foreground: oklch(0.851 0.072 23.344);
  --ring: oklch(0.496 0.144 22.235);
  --chart-1: oklch(0.496 0.144 22.235);
  --chart-2: oklch(0.779 0.045 15.903);
  --chart-3: oklch(0.885 0 180);
  --chart-4: oklch(0.806 0.039 15.718);
  --chart-5: oklch(0.497 0.152 22.794);
}

.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.496 0.144 22.235);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.779 0.045 15.903);
  --secondary-foreground: oklch(0.252 0.037 17.826);
  --accent: oklch(0.885 0 180);
  --accent-foreground: oklch(0.371 0 168.69);
  --destructive: oklch(0.366 0.137 29.564);
  --destructive-foreground: oklch(0.851 0.072 23.344);
  --ring: oklch(0.496 0.144 22.235);
  --chart-1: oklch(0.496 0.144 22.235);
  --chart-2: oklch(0.779 0.045 15.903);
  --chart-3: oklch(0.885 0 180);
  --chart-4: oklch(0.806 0.039 15.718);
  --chart-5: oklch(0.497 0.152 22.794);
}