colors: Functions for easily accessing preferred colors

Description Usage Arguments Value Examples

Description

Functions that return a color (or set of colors) of interest for use in data visualization.

Usage

1
schneidr_purple(alpha = 1)

Arguments

alpha

A single number between 0 and 1

Value

A character vector with elements of 7 or 9 characters, "#" followed by the red, blue, green and optionally alpha values in hexadecimal.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(ggplot2)
mtcars[['gear']] <- factor(mtcars[['gear']])
ggplot(mtcars) +
geom_point(aes(x = wt, y = mpg),
           color = schneidr_purple(),
           size = 3) +
labs(title = "Fuel economy and weight",
     subtitle = "Data from the 1974 Motor Trend US magazine.",
     x = "Weight (1000 lbs)",
     y = "Fuel economy (mpg)")

bschneidr/schneidr documentation built on Dec. 25, 2021, 4:55 p.m.