gameR provides a collection of R colour palettes inspired by video games.
Note: these colour palettes may not be colour blind friendly. If accessibility is a priority, I recommend either using the virdis package or checking your plots before sharing using tools which simulate colour blindness such as coblis
Table of Contents
gameR is on CRAN! Install the stable version of gameR with:
You can install the development version of gameR from GitHub with:
The development version of gameR may include additional palettes, however breaking changes may be implemented before the CRAN release of these palettes.
gameR provides either discrete colour palettes or continuous palettes generated by interpolating a discrete palette. Discrete palettes and continuous palettes are provided via the gameR_cols()
and gameR_cont()
functions respectively with the name of the palette passed as an argument. For a full list of the palettes provided by gameR
, call one of these functions without any arguments.
gameR_cols()
#> [1] "blocks" "cowboy" "cups" "cyberpunk" "fallout" "gris"
#> [7] "ocarina" "p4g" "rayman" "spirit" "splat" "superbros"
#> [13] "wow"
This section presents a list of the palettes provided by gameR ordered alphabetically by the name of the game which inspired the palette.
Contributions via pull requests are welcome! I would love to have as many video games represented as possible. With that said, there are two requirements I ask of any contributed palettes:
Adding a new palette is as simple adding a new element to the gameR_colors
list in R/palettes.R, and calling devtools::document()
from R to update the package documentation.
The readme is generated by README.Rmd. Please update this file with the palettes you are contributing (the palettes are in alphabetical order) and knit the file before committing and pushing your contributions.
If you are contributing palette(s), I would love for your contribution to be recognised. Please feel free to add yourself as a contributor (role = “ctb”) in the DESCRIPTION file.