title: python plotly graph objects - discrete_color_map like in plotly express
body: <p>i am looking for a solution to use a dict  like :</p>
  <pre><code>colors={
      &quot;Oxygen&quot;: &quot;#bf230f&quot;,
      &quot;Hydrogen&quot;: &quot;#19848c&quot;,
      &quot;Carbon_Dioxide&quot;: &quot;#d94f3d&quot;,
      &quot;Nitrogene&quot;: &quot;#8c2d20&quot;}
  
  </code></pre>
  <p>instead of the list colors in the following example</p>
  <pre><code>import plotly.graph_objects as go
  colors = ['gold', 'mediumturquoise', 'darkorange', 'lightgreen']
  
  fig = go.Figure(data=[go.Pie(labels=['Oxygen','Hydrogen','Carbon_Dioxide','Nitrogen'],
                               values=[4500,2500,1053,500])])
  fig.update_traces(hoverinfo='label+percent', textinfo='value', textfont_size=20,
                    marker=dict(colors=colors, line=dict(color='#000000', width=2)))
  fig.show()
  </code></pre>
  <p>in plotly express this is possible with &quot;color_discrete_map=&quot;, but i have to use graph.objects. thanks for help!</p>