SLUpalette: Work with SLU colors

View source: R/SLUcolors.R

SLUpaletteR Documentation

Work with SLU colors

Description

Get different variants of color palettes containing official SLU colors. Also avaliable is the "wong_234516" palette with non SLU colors but adapted to colorblindness. "wong_234516" will be deprecated if/when a similar and official palette becomes available.

Usage

SLUpalette(palette, color_names = TRUE)

Arguments

palette

character or numeric defining the desired color palette. Allowed values "all", "red", "green", "blue", "yellow", "grey" and "wong_234516" or a number 1:5.

color_names

logical return named vector or not. Default TRUE

Details

SLUpalette(palette) returns different variants of the official SLU color palette.

Value

a named vector of color specifications.

Examples

opal <- palette(SLUpalette("red")) # set default palette to SLU "red" and save original palette
plot(Sepal.Width ~ Sepal.Length, data = iris, pch = 16, col = Species)
palette(SLUpalette("blue")) # set default palette to SLU "blue"
plot(Sepal.Width ~ Sepal.Length, data = iris, pch = 16, col = Species)
palette(opal)


kagervall/SLUcolors documentation built on Jan. 31, 2024, 11 a.m.