knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/" )
pal is a color palette search engine that will find your ideal color palette by making cpt-city, hex-color, and paletteer more accessible to realize queries. There are more than 80 000 > palettes waiting to be used!.
#You can install the released version of pal: install.packages("pal") #or the development version from Github: #instal.packages("devtools") devtools::install_github('csaybar/pal')
pal
has been designed to be the most intuitive as possible. You can access to any color palette using pal_search
and pal_get
.
pal_search
initializes a S3 object that stores the databases and globals params (See pal_search). Additionally, its have four methods:
pal_n
: filter by color palette complexity.pal_colors
: filter considering the distance (in CIELAB color space) to preferable colors.pal_tags
: filter using the label attached to each palette color.plot
: display the multiple palette options in a plot.# pal_search(return = 15, catalogs = c('cpt-city')) + pal_colors(blue,yellow) + pal_tags(precipitation,rainfall) + pal_plot()
Once you have decided what your palette is. It is time for pal_get!.
mypal <- pal_get(id = 'cpt0441', n = 10, reverse = TRUE, interpolate = 'spline') pal_plot(mypal)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.