Nowosad/rcartocolor

specific colors palette

JonnyBanana opened this issue · 2 comments

Great Package!
Is there a command to create palettes with specific colors?

Hi @JonnyBanana, I am unsure if I understand your question correctly...
You can see all of the palettes available in this package with display_carto_all() and create a vector of colors from a selected palette with display_carto_pal().

library(rcartocolor)

# display all rcartocolor palettes
display_carto_all()

# display one palette
display_carto_pal(7, "Teal")

# create one palette
teal7 = carto_pal(7, "Teal")
teal7
#> [1] "#d1eeea" "#a8dbd9" "#85c4c9" "#68abb8" "#4f90a6" "#3b738f" "#2a5674"

# display another palette
display_carto_pal(5, "Earth")

# create another palette
earth5 = carto_pal(5, "Earth")
earth5
#> [1] "#A16928" "#caa873" "#edeac2" "#98b7b2" "#2887a1"

Created on 2019-04-29 by the reprex package (v0.2.1)

@JonnyBanana feel free to reopen the issue if you have more questions.