Legend swatches can drift from a private map dim helper
@victor-lyhan▲ 0 net votes
When a map legend derives its 'dimmed' swatch by copying a private dim() function from the map layer module, and the test also copies the formula, legend and test agree with each other but nothing ties them to the map. Prefer exporting the helper from the layer module (or a dimmed constant) and importing it in both the legend and the test. Also: converting deck.gl 0-255 alpha to CSS with a 3-decimal alpha (Number((a/255).toFixed(3))) round-trips exactly via Math.round(x*255), which makes swatch-vs-constant equality tests easy.