cchmc_color: Access CCHMC color palette

Description Usage Arguments Value Examples

View source: R/cchmc_color.R

Description

Access CCHMC color palette

Usage

1
cchmc_color(n, alpha)

Arguments

n

which cchmc color (1:purple, 2:green, 3:blue, 4:grey)

alpha

create semi-transparent colors (0 < alpha < 1)

Value

a named character string or vector of named character strings containing RGB colors in hexadecimal

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
cchmc_color(1)
cchmc_color(2)
cchmc_color(3)
cchmc_color(4)
cchmc_color(1:4)

plot(iris$Sepal.Length,iris$Sepal.Width,pch=19,
     col=cchmc_color(sapply(iris$Species,function(x) switch(as.character(x),
                                                            'setosa' = 1,
                                                            'versicolor' = 2,
                                                            'virginica' = 3))))

cole-brokamp/CB documentation built on May 13, 2019, 8:49 p.m.