How to turn off colorscale completely?

Dear Community Members,

I am trying to do dynamic hiding of a color scale. My code is like this:

    if all(color) == 'grey':
        fig.add_trace(go.Scatter(x=data['x'], y=data['y'], mode='markers', name=property, marker=dict(color=color,showscale=False)))
    else:
        fig.add_trace(go.Scatter
                        (x=data['x'], y=data['y'], mode='markers', name=property, marker=dict(color=color, showscale=True)))

The problem is that, once raised, the colorscale does not go out. It just turns to empty (see screenshot). Moreover, if you do just

fig.add_trace(go.Scatter(x=data[‘x’], y=data[‘y’], mode=‘markers’, name=property, marker=dict(color=color,showscale=False)))

on a new figure, the colorscale occurs too! It looks like a bug.