see https://codepen.io/alexcjohnson/pen/JeXOGX?editors=1010
The large point above the line should be orange (as it is in the legend) but it ends up blue, taking its color from the previous trace.
Fiddling around with the settings, there seem to be various ways to trigger or avoid this behavior. See also https://codepen.io/donolingerPHX/pen/qQZdxE?editors=1010
Seems to have come in with v1.36.0 - perhaps #2499?
Seems to have come in with v1.36.0
Good eye, both codepens work with v1.35.2:
In both cases, the options computed in scattergl/convert.js appear correct:


looking at [1].color.
perhaps #2499?
Yeah good eye, but maybe changes to regl-scatter2d that accommodate splom traces in https://github.com/plotly/plotly.js/pull/2505 are to blame too.
Here's the diff between the regl-scatter2d version used in 1.35.2 and 1.36.0:
Ah, this line
seems problematic.
Here's my attempt: https://github.com/plotly/plotly.js/compare/scattergl-maxColors-4096 which uses https://github.com/plotly/plotly.js/compare/scattergl-maxColors-4096 - but unfortunately breaks the gl2d_scatter-color-clustering mock.
Ha, I think I know why Dima used maxColors=255, 255 is the largest integer that can be put in a Uint8Array which is below the maxTextureSize limit of what looks like 16384.

Doing this with 16 bits would give: (2**16-1) = 65535 which of course is > 16384
Well, 255 colors is for sure not enough. Looks like we could theoretically reach 16384 with just one WebGL texture. @archmoj would you be interested in looking at this further?
Interesting. Let me have a look.
Hey guys can we possibly create a problematic test case in regl-scatter2d mocks (after we merge https://github.com/gl-vis/regl-scatter2d/pull/15)?
maxColors=255 there is wrong, in fact that is 256 colors. But that is not the point - for the case when the trace has more than 255 colors regl-scatter2d just puts all of them into an attribute buffer directly, so all of the trace colors get displayed, none of them lost. That does not even cause memory overhead, because if we want to use big texture with color palette (more than 256x256), we have to use two Uint16s pointers for color id, but that is the same as single Uint32 color value, therefore having a long buffer with colors directly is valid solution.
The issue seems to be something different.
Most helpful comment
Interesting. Let me have a look.