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
| Slot | Categories | Light | Dark |
|---|---|---|---|
| Force | force | cyan-600 #0891b2 | cyan-300 #67e8f9 |
| Spacial | spacial | blue-600 #2563eb | blue-500 #3b82f6 |
| Power | power | violet-800 #5b21b6 | violet-400 #a78bfa |
| Velocity | velocity | pink-700 #be185d | pink-600 #db2777 |
| Other | loading, number, index, time | slate-500 #64748b | slate-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 readprefersDarkScheme(), andmetricCategoryColorHexForSchemeserves 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.tsxandapps/portal/src/app/layout.tsxsetdata-metric-palette="five"on<html>. Without the attribute the legacy palette of eight applies. -
CSS:
html[data-metric-palette="five"]overrides--metric-*indesign-system.css, sometricCategoryColor(Of)and thebg-/text-metric-*utilities follow. -
Hex helpers:
metricCategoryColorHex(Of)andspacialAltColorHexincategory-colors.tsread the attribute throughgetMetricPalette()(palette.ts, which also holdsFIVE_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.
| State | Look | Flag |
|---|---|---|
| Normal (concentric, valid) | solid metric colour | — |
| Eccentric | 1.5 px outline (1 px on the thin standalone bars) over a 16 % tint | ECCENTRIC_OUTLINE_BARS (false = diagonal hatch) |
| Invalid | the same fill and phase look, colour muted to 30 % | — |
| Selected set | the other sets dim to 30 %; the selected one stays at full strength | SELECTED_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 addSELECTION_RING_ROOMso 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.
SessionTrainedSectiontakessessionTone(default"redOrange"); both hosts pass"deepGreen", plus pill bars atREP_BAR_THICKNESS_PXandtitleInCard: the tracking app behindDEEP_GREEN_SESSION_BARSinlive-session-trained.tsx, the portal insession-details-tab.tsx(which also passestitleInCardtoSessionTrainedSectionSkeleton). The portal keeps muscle names on narrow cards (nonarrowIcons). - 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-darksubtree, so badges, dots, dividers and hover states take their dark-surface values in both schemes. - Tablet rail: white icons;
DEEP_GREEN_RAILintablet-rail.tsx. - Recommendation cards: white glyphs; red-orange only on the load +/−
badge and the stop variant's warning glyph.
CARD_LOOKinrecommendation-cards.tsx("deepGreen", or"platinum"/"gradient"for the earlier looks).