# Graph Objects not reading colors

**URL:** <https://community.plotly.com/t/graph-objects-not-reading-colors/74371>\
**Category:** Dash Python\
**Created:** [April 12, 2023, 5:27pm UTC](https://community.plotly.com/t/graph-objects-not-reading-colors/74371 "2023-04-12T17:27:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)\
**Post date:** [April 12, 2023, 5:45pm UTC](https://community.plotly.com/t/graph-objects-not-reading-colors/74371/2 "2023-04-12T17:45:29Z")

</div>

The marker is a trace property.

Hence you need to use update\_traces, probably in conjunction with the selector parameter or using for\_each\_trace.

Here an example:

> [@Scatter color not match with its legend](https://community.plotly.com/t/scatter-color-not-match-with-its-legend/70532/6):
>
> Hi, you can do so using the selector argument of figure.update\_traces() fig.update\_traces({'opacity': 0.5}, selector={'name': 'won'}) fig.update\_traces({'opacity': 1.0}, selector={'name': 'lost'}) You could even change the size or marker color the same way: fig.update\_traces({'opacity': 0.5}, selector={'name': 'won'}) fig.update\_traces({'opacity': 1.0, 'marker':{'color':'blue','size':10}}, selector={'name': 'lost'}) [newplot (25)] mrep traces

---

_[View the full topic](https://community.plotly.com/t/graph-objects-not-reading-colors/74371)._
