# Colorway / repeat standard colors in subplots

**URL:** <https://discourse.julialang.org/t/colorway-repeat-standard-colors-in-subplots/99282>\
**Category:** General Usage\
**Tags:** plotlyjs\
**Created:** [May 23, 2023, 1:52pm UTC](https://discourse.julialang.org/t/colorway-repeat-standard-colors-in-subplots/99282 "2023-05-23T13:52:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ellocco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ellocco/32/31331_2.png) [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Post date:** [May 23, 2023, 1:52pm UTC](https://discourse.julialang.org/t/colorway-repeat-standard-colors-in-subplots/99282/1 "2023-05-23T13:52:27Z")

</div>

I have two subplots and would like to repeat the same color sequence inside these subplots. One way is to define upfront my own list of colors, another way is to get access to the standard colors of the current color scheme, that is what I am interested in.  
I have not found a description so far how to do it, but I found a function called `PlotlyBase._get_colorway()`. Below my example, I would like to know, if this is the recommended way to repeat the same color order in subplots based on the predefined `colorway`:

```julia
using PlotlyJS, DSP, Printf
# ---
fig_obj = PlotlyJS.Plot()
current_colorway = PlotlyJS.PlotlyBase._get_colorway(fig_obj)
PlotlyJS.add_trace!(fig_obj, PlotlyJS.scatter(; y= [1,2,3], line_color = current_colorway[1]))

```
