dgi_colors: DGI Clinical colors

Description Usage Arguments Examples

View source: R/dgi_palette.R

Description

Function to extract DGI colors as hex codes.

Usage

1

Arguments

...

Character names of DGI colors. Any combination of "teal", "light grey", "black", "blue", "sea green", "white", "red", "brown", "chestnut", "yellow", "violet", "orange", "purple", "pastel red", "lapis lazuli", "hansa yellow", or "dark liver". By default, returns all colors in a vector.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(ggplot2)

ggplot(mtcars, aes(hp, mpg)) +
  geom_point(size = 4, color = dgi_colors("teal")) +
  theme_minimal()

ggplot(mtcars, aes(hp, mpg, color = factor(cyl))) +
  geom_point(size = 4) +
  scale_color_manual(values = dgi_colors()[1:3]) +
  theme_minimal()

ggplot(mtcars, aes(hp, mpg, color = factor(cyl))) +
  geom_point(size = 4) +
  scale_color_manual(values = dgi_colors("teal", "light grey", "black")) +
  theme_minimal()

taylordunn/dgitheme documentation built on March 10, 2020, 5:01 p.m.