Skip to content

Color palettes from the Mignolaverse

License

Unknown, MIT licenses found

Licenses found

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

mccarthy-m-g/BPRDcolours

Repository files navigation

BPRDcolors

Author: Michael McCarthy

License: MIT

The BPRDcolours package provides a collection of color palettes based on Star Trek. It also offers functions for custom palettes and scale_* functions for use with ggplot2.

Installation

Install the CRAN release of BPRDcolours with

install.packages("BPRDcolours")

Install the development version from GitHub with

# install.packages("remotes")
remotes::install_github("mccarthy-m-g/BPRDcolours")

Examples

Basics

library(BPRDcolours)
library(ggplot2)

bprd_pal("hellboy")
#> [1] "#DA3A2C" "#FFD576" "#B19F61" "#6F5F45"

bprd_pal("abe")
#> [1] "#006E7D" "#3A948A" "#C1DFA3" "#A0DED3"

Preview the hellboy and abe palettes.

view_bprd_pals(c("hellboy", "abe"))

Scale functions for use with ggplot2

p <- ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Species)) + 
  geom_point(size = 5, alpha = 0.75)
p + scale_colour_bprd() # starfleet is default palette

p <- ggplot(diamonds, aes(carat, stat(count), fill = cut)) +
  geom_density(position = "fill")
p + scale_fill_bprd("hellboy")

p + scale_fill_bprd("abe")

p + scale_fill_bprd("liz")

d <- diamonds[diamonds$cut >= "Very Good", ]
p <- ggplot(d, aes(carat, stat(count), fill = cut)) +
  geom_density(position = "fill")
p + scale_fill_bprd("roger")

All predefined palettes

# See available palette names
bprd_pal()
#> [1] "bprd_series"     "hellboy"         "abe"             "liz"            
#> [5] "roger"           "lobster_johnson"

# view all predefined palettes
view_bprd_pals()

About

Color palettes from the Mignolaverse

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Languages