Skip to content

A toolkit of functions that help you build and modify color palettes for figures.

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

MargaretSiple-NOAA/palettehelper

Repository files navigation

palettehelper

Lifecycle: experimental CRAN status

The goal of palettehelper is to help you build and manage color palettes in R for data viz. I mostly made it for myself! And as a test package for customizing content in the Fisheries Integrated Toolbox documentation.

Installation

You can install the development version of palettehelper from GitHub with:

# install.packages("devtools")
devtools::install_github("MargaretSiple-NOAA/palettehelper")

Example

Expand the very beautiful (but short) color palettes from your favorite palette package.

library(RColorBrewer)
library(palettehelper)


pal <- RColorBrewer::brewer.pal(n = 6,name = "PuBuGn")
longer_pal <- palettehelper::lengthen_pal(shortpal = pal, newlength = 20)
print(longer_pal)
#>  [1] "#F6EFF7" "#ECE7F2" "#E2DFEE" "#D8D7E9" "#CDCFE5" "#C2CAE2" "#B7C5DF"
#>  [8] "#ACC0DC" "#9FBAD9" "#8EB5D6" "#7EB0D3" "#6DABD0" "#5BA5C6" "#479EB8"
#> [15] "#3397AA" "#1F919B" "#16888B" "#0F7E7A" "#087569" "#016C59"
par(mfrow=c(1,2))
scales::show_col(pal)
scales::show_col(longer_pal)

NOAA Fisheries Logo

U.S. Department of Commerce | National Oceanographic and Atmospheric Administration | NOAA Fisheries

About

A toolkit of functions that help you build and modify color palettes for figures.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published