Instrumentation for shadcn/ui

Instrumentation is a shadcn/ui theme built around a muted deep blue primary color (#2f3b4c) with muted deep orange accents (#4c3f2f). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep blue primary (#2f3b4c) on a blue-tinted background (#05070a).

Color palette

TokenLightDark
Background
#ffffffwhite
#05070ablack
Foreground
#000000black
#fcfcfdwhite
Card
#ffffffwhite
#05070ablack
Card foreground
#000000black
#fcfcfdwhite
Popover
#ffffffwhite
#05070ablack
Popover foreground
#000000black
#fcfcfdwhite
Primary
#2f3b4cdarkslategray
#2f3b4cdarkslategray
Primary foreground
#ccd5e0lightgrey
#ccd5e0lightgrey
Secondary
#4c3f2fdarkolivegreen
#4c3f2fdarkolivegreen
Secondary foreground
#e0d8cclightgrey
#e0d8cclightgrey
Muted
#e6ddd1gainsboro
#2e2519black
Muted foreground
#756857dimgray
#a89b8arosybrown
Accent
#4c3f2fdarkolivegreen
#4c3f2fdarkolivegreen
Accent foreground
#e0d8cclightgrey
#e0d8cclightgrey
Destructive
#920c0cdarkred
#ee2b2bcrimson
Destructive foreground
#fcd5d5mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2f3b4cdarkslategray
#2f3b4cdarkslategray

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.64:1AAA
Secondary button7.21:1AAA
Muted text4.02:1AA Large
Accent7.21:1AAA
Destructive6.83:1AA
Dark mode
Text on background19.63:1AAA
Text on card19.63:1AAA
Primary button7.64:1AAA
Secondary button7.21:1AAA
Muted text5.52:1AA
Accent7.21:1AAA
Destructive4.19:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.9 0.019 74.817);
  --muted-foreground: oklch(0.525 0.031 74.433);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.349 0.034 255.304);
  --primary-foreground: oklch(0.87 0.018 255.057);
  --secondary: oklch(0.377 0.032 74.032);
  --secondary-foreground: oklch(0.884 0.018 74.822);
  --accent: oklch(0.377 0.032 74.032);
  --accent-foreground: oklch(0.884 0.018 74.822);
  --destructive: oklch(0.42 0.165 28.273);
  --destructive-foreground: oklch(0.905 0.044 17.991);
  --ring: oklch(0.349 0.034 255.304);
  --chart-1: oklch(0.349 0.034 255.304);
  --chart-2: oklch(0.377 0.032 74.032);
  --chart-3: oklch(0.377 0.032 74.032);
  --chart-4: oklch(0.408 0.035 74.002);
  --chart-5: oklch(0.348 0.038 255.34);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.129 0.008 250.577);
  --foreground: oklch(0.992 0 254.956);
  --muted: oklch(0.271 0.024 73.936);
  --muted-foreground: oklch(0.696 0.029 74.631);
  --popover: oklch(0.129 0.008 250.577);
  --popover-foreground: oklch(0.992 0 254.956);
  --card: oklch(0.129 0.008 250.577);
  --card-foreground: oklch(0.992 0 254.956);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.349 0.034 255.304);
  --primary-foreground: oklch(0.87 0.018 255.057);
  --secondary: oklch(0.377 0.032 74.032);
  --secondary-foreground: oklch(0.884 0.018 74.822);
  --accent: oklch(0.377 0.032 74.032);
  --accent-foreground: oklch(0.884 0.018 74.822);
  --destructive: oklch(0.612 0.228 27.272);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.349 0.034 255.304);
  --chart-1: oklch(0.349 0.034 255.304);
  --chart-2: oklch(0.377 0.032 74.032);
  --chart-3: oklch(0.377 0.032 74.032);
  --chart-4: oklch(0.408 0.035 74.002);
  --chart-5: oklch(0.348 0.038 255.34);
}