/** * LANE-UI — machine accent colors for build-bar icons. * * `ItemDef` carries a `color`; `MachineDef` does not, so the build bar has nothing * data-driven to tint with. These are transcribed from docs/FKTRY_LORE.md §4 (each * machine's ASSET block names its impossible element) as a stopgap. * * CONTRACT REQUEST filed in NOTES: add `MachineDef.color` — LANE-RENDER needs the same * value for its placeholder box tint, and two lanes hand-maintaining the same table is * how the build bar and the world end up disagreeing about what a quantizer looks like. * Until then: id override, else kind fallback, else house green. Never crashes on a * machine we've never heard of. */ import type { MachineDef, MachineKind } from '../contracts'; const BY_ID: Record = { 'seam-extractor': '#c8a03f', // grimy yellow chassis belt: '#5a7a5a', demuxer: '#ff3fd4', // the magenta output chute quantizer: '#e8e0ff', // HF dust leaking from the seams 'mosh-reactor': '#ff7a3f', // melt, seen through the porthole 'decode-asic': '#3fffe0', // serene LED face shipper: '#d8ffd8', // THE SCREEN's own light }; const BY_KIND: Record = { extractor: '#c8a03f', belt: '#5a7a5a', crafter: '#3fffe0', splitter: '#7fb0ff', power: '#3fffe0', buffer: '#7fb0ff', shipper: '#d8ffd8', }; export function machineColor(def: MachineDef): string { return BY_ID[def.id] ?? BY_KIND[def.kind] ?? '#d8ffd8'; }