Setting plot colors by legend?

Is there a method to set plot colors by the legend (alphabetically) instead of the colors being determined by the values?

Im using plotly offline for python and im unable to find a method (unless I manually define every traces color). Iā€™m building dashboards offline and its not intuitive to look at several pie/bar/scatter plots with identical items in the legend but each legend assigns a different color.

Any recommendations?

Any solution for this ? I am using bar chart from plotly and need to specify colors for specific legends.
I have posted also here: