A contact heatmap: spread it into a colouring with its target,
store.setDisplay(a, { coloring: { distanceTo: b, ...contactHeatmap({ depth, gap }) } }).
The range is [-depth, gap] (below clamps to deep, above shows the base
colour). From -depth the colour runs from deep to shallow just below
the contact band, is contact across [-tolerance, +tolerance] (a single
stop at 0 when the tolerance is 0), then runs from near just above the
band to far at gap. With gap 0 there is no gap ramp: the range is
[-depth, tolerance] and anything beyond the band shows the base colour.
A change of tolerance or colors alone keeps maxDistance and sign,
so the store reuses its field and only recolours.
A contact heatmap: spread it into a colouring with its target,
store.setDisplay(a, { coloring: { distanceTo: b, ...contactHeatmap({ depth, gap }) } }).The range is
[-depth, gap](below clamps todeep, above shows the base colour). From-depththe colour runs fromdeeptoshallowjust below the contact band, iscontactacross[-tolerance, +tolerance](a single stop at 0 when the tolerance is 0), then runs fromnearjust above the band tofaratgap. Withgap0 there is no gap ramp: the range is[-depth, tolerance]and anything beyond the band shows the base colour. A change oftoleranceorcolorsalone keepsmaxDistanceandsign, so the store reuses its field and only recolours.