# PlotlyJS - Match trace color

**URL:** <https://discourse.julialang.org/t/plotlyjs-match-trace-color/24967>\
**Category:** New to Julia\
**Created:** [June 5, 2019, 2:54pm UTC](https://discourse.julialang.org/t/plotlyjs-match-trace-color/24967 "2019-06-05T14:54:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rand5](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rand5/32/867_2.png) [@rand5](https://discourse.julialang.org/u/rand5)\
**Post date:** [June 5, 2019, 2:54pm UTC](https://discourse.julialang.org/t/plotlyjs-match-trace-color/24967/1 "2019-06-05T14:54:55Z")

</div>

I am using PlotlyJS to plot pairs of traces (raw data and lines of best fit). I’d like for each pair of traces to show as the same color. Is there a way to query the color used in a specific trace in order to reuse it later?

As an outline:

```julia
using PlotlyJS
t1 = scatter(;y=rand(5))
c = ... #here we get the color used in t1
t2 = scatter(;y=rand(10),marker_color=c)
plot([t1,t2])

```

Thanks in advance
