Contains code for R package with R color palettes inspired by the University of Pittsburgh.
Code adopted from the lovely inauguration
R package by Cianna Bedford-Petersen, available here.
Install the pittpalette
R package using the following code:
#install.packages("devtools")
devtools::install_github("kimberlywebb/pittpalette", ref="main")
library(pittpalette)
Use the names
function to view the available color palettes.
names(pitt_palettes)
# [1] "primary_contemporary" "primary_legacy" "primary" "secondary"
# [5] "accent_rich" "accent_vibrant" "accent"
Call the palette using the render_pitt_palette
function
render_pitt_palette("primary")
View a subset of the accent color scheme
render_pitt_palette("accent", 5)
Use colors from pitt_palettes
in your graphs
set.seed(1)
hist(rnorm(n = 100, mean = 0, sd = 1), col = pitt_palettes[["primary_contemporary"]][1])