Direct color mapping in px.bar

Hello Dashers,

I am now using px.bar. I want to assign 100 color values to a 100 value color scale. Should be easy enough right? Well I have defined color_discrete_sequence to my list of 100 colors and it works fine if I have values for all colors. But it seems that it assigns the 100 colors in order to the first 100 numbers coming out of the df. My coloring is sequential but if I am skipping a color, 0, 1, 2, 3, 4, 6, then color 5 gets assigned to 6 and the coloring is one off from that point on. It won’t be long before there are a few skips and I am off by 5-8 colors.

Is there any way within px.bar to define a direct color mapping and not use colorscales?

solved this myself using color_discrete_map=“identity” it was in there clearly on Discrete Colors | Python | Plotly