Plotly scatter plot change coloring scheme

I have a 11 x 2 numpy array X that I plug in plotly to scatter my points. Apart from that, I have a 10 x 11 pandas df with colors (as columns). My purpose is the following: for each column in the pandas df (that is, for each color), it should be possible to use that column in the coloring of these 11 points from the legend of the graph. That is, if we have the column 'Blue' with values [14.0, 12.0, 0, 0, 17.0, ....] , 'Blue' should be clickable from the legend and the color of the points change accordingly. This should hold for all the 22 columns of the dataframe. Examplary code:

import numpy as np
import plotly.express as px
df =
    Blue   Red   Black   White   Orange   Green   ...   Yellow
    14.    15.3  18.     ...
    12.    19.   ...     
    13.    34.
    21.5   3.
    ...    ...
    20.3   13.   15.     ...

X = np.array([[18.0, -5], [12.5, 31], [14., 14.], [10., 10.], [12., 12.], [33.12, -13.], [8., -2.], [10., 11.], [51., -30.], [13., 14.], [20.23., -30.]])
fig = px.scatter(
            X, x=0, y=1, marker_color=df['Blue'],
            mode='markers'
        )
fig.show()

There should be a legend next to the graph with points with all the colors from the df , and whenever a color x clicked, the respective coloring of row x is applied (that is, marker_color becomes df[x] ). If someone can help me do this (how can I dynamically set this marker_color ?), I would be really grateful. I suspect it can be done using plotly’s callbacks. I need it, because otherwise I have to create 11 graphs with the same points but with just different coloring, which creates overhead. Thanks in advance!