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 :

image

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,
Regards
Marion