knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%", dpi = 300 )
This is a color palette R package that contains 128 palettes from Color Lisa.
library(lisa) parts <- data.frame( names = names(lisa), vals = 1 ) waffle::waffle(parts, rows = 5, colors = purrr::flatten_chr(lisa)) + ggplot2::theme(legend.position = "none")
Install the released version of lisa
from CRAN:
install.packages("lisa")
Or install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("tylurp/lisa")
If you aren't an R user, you might be interested in palettes.yml which contains all palettes in YAML format.
Here's a sample of the available palettes:
set.seed(4376)
library(lisa) par(mfrow = c(6, 3)) lapply(sample(lisa, 18), plot)
You can also call and/or modify palettes using lisa_palette
:
x <- lisa_palette("JackBush_1", 1000, "continuous") y <- lisa_palette("PabloPicasso", 2, "discrete") z <- lisa_palette("KatsushikaHokusai", 1000, "continuous") lapply(list(x, y, z), plot)
All palettes have 3 attributes associated with them, you can access them with the lisa
list:
lisa$VincentvanGogh
There is also a table with more information of all available palettes:
artwork
Example ggplot2
usage:
library(ggplot2) ggplot(mtcars, aes(mpg, disp)) + geom_point(aes(col = factor(gear)), size = 5, show.legend = FALSE) + scale_color_manual(values = lisa$`Jean-MichelBasquiat`) + theme_void()
wesanderson
for source code that powers most things in this repositoryAdd the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.