Knowledge

← All knowledge

0009 — Product-wide metric change colors

docs/decisions/0009-metric-change-colors.md

  • Status: accepted
  • Date: 2026-10-14
  • Decided by: Wunwan (designer)

Context

The Optimization round comparison used the product accent for favorable changes. The designer requested one consistent color convention for numerical changes across the product.

Decision

  • An increase uses the green success-muted-foreground token.
  • A decrease uses the red destructive token.
  • Zero change, unavailable data, and unparseable changes use gray muted-foreground.
  • Determine direction from the displayed delta. Rounded zero, including −0.0%, stays gray.
  • Color describes numerical direction. Metric guidance still states whether higher or lower is preferable.
  • Retain the signed value and unit so the meaning remains readable without color.
  • Use the shared metricChangeClass helper in src/lib/metric-change.ts when displaying a delta.

The Optimization comparison uses Geist at the body size (13px/20px) and semibold weight (600) for result values, with normal case for headers. Selected rounds use a light gray semantic surface with no visible selection border; keyboard focus keeps its ring.

Open

None.