library(ggplot2) library(tmap) library(rpgcolorsr) data(NLD_muni)
There are currently 71 colors included in this package the color names and their hex codes are below
rpg_color_list
These are grouped into 20 color palettes, the colors included in each palette and their hex codes are below
rpg_color_palettes
These color palettes can be inserted into ggplot graphics, examples of each palettes in ggplot are below
This package includes four functions:
-rpg_cols() -rpg_color_pal() -scale_color_rpg() -scale_fill_rpg()
takes a input string or group of strings and returns the hex code. The color must be one of the colors included in this package
rpg_cols("blue") rpg_cols("teal", "black")
Converts an input string representing a color palette into a function that can be converted into a usable color palette.
rpg_color_pal("rpg_cold_warm")
By adding a step count after the function it will return a usable palette
rpg_color_pal("rpg_cold_warm")(10)
These palettes can be reversed as needed
rpg_color_pal("rpg_cold_warm", reverse = TRUE)(10)
These functions supply a fill or color to a ggplot call. See examples below.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.