Px.colors.named_colorscales() do not match px.colors.sequential.NAME

Hey @luggie, what are you after? The list of rgb, rgba or hex string for the corresponding colorscale?

If this was the case, you could make use of the swatches() function:

import plotly.express as px

fig = px.colors.sequential.swatches().to_dict()
d = dict()

for trace in fig['data']:
    colors = trace.get('marker').get('color')
    name = trace.get('y')[0]
    d[name]=colors
1 Like