✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Is it possible to change the dot color in legend?

Hi !

I was wondering if it was possible to change the color of the points in the legend.
I have several traces (4 in this example), and each trace has a different colorscale to determine the point’s color.
In the legend, it seems to appear as a “mean color”, and I want it to show the maximum color value of each color scale.

This is a screenshot to show the problem :


I have for the first trace a unique color : #e3e3e3
For the second one : [#e3e3e3, #FF000]
The third one : [#e3e3e3, #0000FF]
The last one : [#e3e3e3, #7F007F]

So, I would like to change the dots in legend to #e3e3e3, #FF0000, #0000FF and then #7F007F.

Is it possible ?

Thanks a lot,