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

Functions Included

This package includes four functions:

-rpg_cols() -rpg_color_pal() -scale_color_rpg() -scale_fill_rpg()

rpg_cols

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

Example:
rpg_cols("blue")

rpg_cols("teal", "black")

rpg_color_pal

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)

scale_color_rpg and scale_fill_rpg

These functions supply a fill or color to a ggplot call. See examples below.



BFroebRPG/rpgcolorsr documentation built on Sept. 4, 2023, 6:31 a.m.