Bid/ask bicolour mode and side legend

Side colouring paints each heatmap cell with the ramp of the side resting there, bid or ask, so the wall ahead of price is told apart from the one behind. Intensity only keeps a single ramp. A small legend shows the two real ramps of the current theme.

Senzoukria · Documentation · Updated September 2026


Where to find it

Where
Heatmap → "Heatmap" button → Rendering tab → "Side colouring" and "Show the legend"
Default
Two colours (bid / ask), legend shown
Legend position
Over the canvas, ask ramp above the bid ramp

What it does

In bicolour mode the hue carries the side and the brightness carries the size. Both sides use the same scale: a bid wall and an ask wall of equal size read equally bright. The side of a level is read from the aggregated book against the best bid and best ask at that instant; it is a measurement on the snapshot, never presented as an order-by-order observation. When the book is crossed or empty, the level is drawn in the neutral colour instead of being assigned to a side by guesswork.

Intensity only restores the earlier single-ramp rendering. Switching between the two costs nothing: the side is already written in a channel of the data texture, and the shader simply stops reading it, so there is no re-pack and no re-upload.

Settings

Side colouring controls
SettingDefaultWhat it changes
Side colouringTwo colours (bid / ask)Two colours: bid ramp and ask ramp. Intensity only: single ramp, brightness = size
Show the legendOnDisplays the “Legend” card with the ask and bid ramps. The row is disabled in Intensity only mode, where a single ramp leaves nothing to tell apart and no legend is drawn
ThemeSenzoukriaChooses which two ramps are used (Classic: blue bid ramp, warm orange ask ramp; Senzoukria: lime bid ramp, magenta ask ramp)

How the legend is built

The legend does not read the CSS tokens on its own. It samples the same 256×2 gradient texture that the shader consumes, row 0 for the bid and row 1 for the ask, at nine points, and turns them into CSS gradients. If a theme declares no ask ramp the texture carries the bid ramp twice and the legend shows two identical bars, which is exactly what the screen does. The legend is rebuilt only when the theme changes, never per frame. Hovering it shows the hint: hue carries the side, brightness the size at that price.

Colour vision

Both ramps of both selectable themes were measured under a deuteranopia simulation (Viénot-Brettel-Mollon 1999, CIE76 distance between the bid and ask colour at equal intensity, swept from intensity 32 to 255; ~2.3 is just perceptible, 10 is clear). Classic holds at 15.2 in its worst case, blue against warm orange. Senzoukria holds at 11.9, because its ask ramp is magenta rather than red: magenta keeps blue, the axis that survives deuteranopia. An earlier red ask ramp measured 3.0 and an amber one 0.9, which is why neither was kept.

A unit test reads the ramps from the stylesheet and fails if a theme stops clearing the bar, and a second test fails if the default theme is not one of the measured-safe ones. The fallback block used when no theme attribute is set is the one that does not clear it; it is a safety net, not a theme you can select. Position stays the second dimension in every case: asks rest above the mid, bids below.

Limits

  • The side is inferred per snapshot from the aggregated book. It is not a market-by-order attribution.
  • The legend is a reminder of the mapping, not the reading mechanism: the side must remain readable on the chart from hue and position alone.
  • The bid and ask ramps of the heat cells are fixed by the theme. The bid/ask colour pickers in the Markers tab change the best bid and best ask lines, and those in the DOM ladder and Profiles tabs change the ladder bars — none of them recolours the heat cells.

This page in other languages

Frequently asked questions

Why did the legend disappear?
Either “Show the legend” is off, or Side colouring is set to Intensity only — the row is then disabled and, with a single ramp, there is nothing to tell apart, so no legend is drawn.
Does the bicolour mode slow the heatmap down?
No. It toggles one shader uniform; the data texture is unchanged and no extra comparison is done per frame.
What colour does a crossed book get?
The neutral colour. The engine refuses to assign a side when the best bid is at or above the best ask or when a side is empty.

Keep reading