knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%",
  dpi = 300
)

lisa

R build status CRAN status CRAN_Download_Badge Codecov test coverage

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")

Installation

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.

Palettes

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()

Acknowledgements



tyluRp/lisa documentation built on Sept. 25, 2020, 9:44 a.m.