Skip to main content

Metric colours

Both apps draw metrics in five colours: force cyan, spacial blue, power violet, velocity pink, and every other category in slate. The legacy palette of eight remains the fallback when no palette is set. Red-orange is not a metric colour: it marks highlights, selection and warnings.

The five-colour palette​

SlotCategoriesLightDark
Forceforcecyan-600 #0891b2cyan-300 #67e8f9
Spacialspacialblue-600 #2563ebblue-500 #3b82f6
Powerpowerviolet-800 #5b21b6violet-400 #a78bfa
Velocityvelocitypink-700 #be185dpink-600 #db2777
Otherloading, number, index, timeslate-500 #64748bslate-500 #64748b

The second spacial series (spacialAltColorHex) is blue-400 #60a5fa / blue-300 #93c5fd.

  • Why these steps: force stays cyan and spacial blue, as in the legacy palette, so customers keep their colour per metric. The Tailwind steps differ per hue because at one step blue and violet share a lightness and merge for red-green colour-blind viewers. Every colour keeps ≥ 3.5:1 on its background; the legacy force, number, index and time sit below 2.3:1 on white.
  • Scheme-dependent: unlike the legacy palette, the five follow light/dark. CSS overrides --metric-*; the hex helpers read prefersDarkScheme(), and metricCategoryColorHexForScheme serves consumers that take both colours. Chart specs kept in module constants read their colour through a getter, so it is resolved at render time.

Where the palette is chosen​

  • Both apps: apps/tracking/src/app/layout.tsx and apps/portal/src/app/layout.tsx set data-metric-palette="five" on <html>. Without the attribute the legacy palette of eight applies.

  • CSS: html[data-metric-palette="five"] overrides --metric-* in design-system.css, so metricCategoryColor(Of) and the bg-/text-metric-* utilities follow.

  • Hex helpers: metricCategoryColorHex(Of) and spacialAltColorHex in category-colors.ts read the attribute through getMetricPalette() (palette.ts, which also holds FIVE_METRIC_HEX).

  • Velocity profile charts: the tracking app's card (velocity-profile-card.tsx) and the portal's analysis chart (velocity-profile-model.ts) both draw the velocity curve in velocity, the power curve in power, the peak-power zone in power and the max-load zone in force. The portal chart ignores the server's suggested series colours for those two axes.

TODO: the portal's Insights series palette (apps/portal/src/components/charts/chart-setup.ts) still lists the legacy eight as literals. It colours many series (athletes, tags), not metric categories, and five colours with four in slate can't tell eight series apart, so it stays until a series palette is decided.

Rep bar states​

Each state changes one visual property, so states combine and still read: colour for the metric, fill for the phase, strength for validity. All of it lives in packages/ui/src/charts/bar-fill.ts.

StateLookFlag
Normal (concentric, valid)solid metric colour—
Eccentric1.5 px outline (1 px on the thin standalone bars) over a 16 % tintECCENTRIC_OUTLINE_BARS (false = diagonal hatch)
Invalidthe same fill and phase look, colour muted to 30 %—
Selected setthe other sets dim to 30 %; the selected one stays at full strengthSELECTED_SET_RING (true = a 2 px ring around the selected set's column instead; tried and reverted 25 Nov 2026)
  • Why a tint, not an empty bar: an empty outline reads as "planned" or "no data", and a muted (invalid) eccentric outline alone nearly vanishes.
  • Selection by dimming: the ring read as a frame around the bars, so the dimming is back. It shares strength with "invalid"; the ring variant stays behind the flag.
  • Where the selection applies: the performance hero chart and both views of the performance metric cards (selectableSetClass). With the ring, their scroll rows add SELECTION_RING_ROOM so it isn't clipped.

Bars that are not metric data​

Volume and progress bars use the brand colours, not a metric colour.

  • Session muscle bars ("What this session did", sets per muscle this session vs the rest of the week): the session's part, its figures and its key dot in Deep Green in both apps, matching the tracking app's Your Week load bar. SessionTrainedSection takes sessionTone (default "redOrange"); both hosts pass "deepGreen", plus pill bars at REP_BAR_THICKNESS_PX and titleInCard: the tracking app behind DEEP_GREEN_SESSION_BARS in live-session-trained.tsx, the portal in session-details-tab.tsx (which also passes titleInCard to SessionTrainedSectionSkeleton). The portal keeps muscle names on narrow cards (no narrowIcons).
  • Other portal amount bars in Deep Green (--foreground-platinum-green-bright): the dashboard's Top exercises and Athlete activity ranking bars (page.tsx), the athlete summary's Muscle usage bars (muscle-usage-card.tsx), the Plan usage bars (plan-view.tsx) and the Insights guided flow's "athletes trained it" mini bars (guided-steps.tsx).
  • Kept red-orange on purpose: the live station's capacity bar (paired with its red-orange ring), the low-battery pill and selected reps in the set timeline.

TODO: the zone-split and lift-band bars alias --data-viz-zone-* to the force / velocity / power metric colours, so training-goal zones wear metric colours. Decide whether zones get colours of their own.

Deep Green brand surfaces​

The tablet rail and the recommendation cards are flat Deep Green, identical in light and dark mode.

  • Tokens: --brand-deep-green (#1c4744, no dark override) for the surface; --on-brand-deep-green (Platinum Green #dae9e1, 8.2:1) and --on-brand-deep-green-muted (#a9c8bf, 5.8:1) for text on it — green tinted, because grey at an opacity reads dull on colour.
  • Dark subtree: both render as a .theme-dark subtree, so badges, dots, dividers and hover states take their dark-surface values in both schemes.
  • Tablet rail: white icons; DEEP_GREEN_RAIL in tablet-rail.tsx.
  • Recommendation cards: white glyphs; red-orange only on the load +/− badge and the stop variant's warning glyph. CARD_LOOK in recommendation-cards.tsx ("deepGreen", or "platinum" / "gradient" for the earlier looks).