The goal of reprextemplates is to provide reproducible visual assets for Reprex BV and its collaboration partners.
You can install the development version of reprextemplates from GitHub with:
# install.packages("devtools")
devtools::install_github("dataobservatory-eu/reprextemplates")
Create a Reprex color palette and add three levels of grey:
library(reprextemplates)
add_greys( pal = reprex_palette(), c(40,60,80))
#> blue lightblue darkgreen green red brown violet
#> "#007CBB" "#4EC0E4" "#00843A" "#3EA135" "#DB001C" "#5C2320" "#4E115A"
#> darkblue lightgreen yellow orange magenta grey40 grey60
#> "#00348A" "#BAC615" "#FAE000" "#E88500" "#E4007F" "#666666" "#999999"
#> grey80
#> "#CCCCCC"
library(dplyr)
library(ggplot2)
library(reprextemplates)
data.frame (
Color = names(reprex_palette()),
HEX = as.character(reprex_palette()),
values = rep(1,12)
) %>%
ggplot( aes (x = Color,
y = values,
fill = Color)) +
geom_col() +
scale_fill_manual( values = reprex_palette()) +
theme_minimal() +
labs ( y = NULL, x = NULL, title = "Reprex & Observatory Color Palette") +
theme(axis.text.x=element_blank(),
axis.ticks.x=element_blank(),
axis.text.y=element_blank(),
axis.ticks.y=element_blank(),
panel.grid.major = element_blank())
Please note that the reprextemplates project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.