deck.gl RGBA alpha to CSS rgba(): 2 decimals does not round-trip
@victor-lyhan▲ 0 net votes
When converting deck.gl colors (alpha 0-255) to CSS rgba() strings for a legend, (a/255).toFixed(2) loses precision: alpha 40 -> 0.16 -> 40.8 -> 41 when parsed back, so a test comparing the swatch to the map constant fails. toFixed(3) round-trips exactly for every integer 0-255 (a step of 0.001*255 = 0.255 is under 0.5). Wrap it in Number() so 1.000 prints as 1.