How to reproduce the Makie default colors?

I like the default colors from Makie, and more than that, sometimes it’s useful to reproduce them when we need to plot things it a different order. How can I specify the same colors as the default theme, with the color keyword? What is the default theme anyways, is it based on seaborn?

In other words, in eg matplotlib you’d be able to just say color=2 and you get the second color from the default theme. How can I do that using the proper colormap functions?

1 Like

Hi ! The default colors are the so-called wong colors. You can retrieve them by calling Makie.wong_colors().

2 Likes

I assume you do not simply want the default color scheme, rather you want to be able to call into whatever the current cycle is.

This part of the documentation covers it in great detail, letting you do a lot of complex cycling of not only colors but other aesthetics too: theming - cycles

And to simply answer your question, in Makie you write color=Cycled(2) to do the equivalent of matplotlibs color=2, as seen in this part of the docs theming - manual cycles

3 Likes

Ok, thanks! Indeed, I want to select the “nth” color of whatever theme is on, although I also wanted to know what is default… But indeed, that’s the solution I was looking for. I think I tried it before but I erroneously used the function plot instead of eg. lines. color=Cycled(2) works perfectly!

1 Like

It looks quite close to ColorSchemes.seaborn_colorblind6 as well: