sphsu_cols: Select SPHSU colours

View source: R/sphsu_.R

sphsu_colsR Documentation

Select SPHSU colours

Description

This function allows you to select a colour or a vector of colours by name, or to specify a 'main' or 'more' subset.

Usage

sphsu_cols(..., subset = "all", names = TRUE)

Arguments

...

Character. Colour names separated by commas. Left blank this will return all colours in subset.

subset

Character. "all", "main" or "more" can be called (this only needs used in place of colour names above).

names

Logical. If passing directly to scale_manual then set this as TRUE to remove names and allow assignment to plotted variables.

Details

The names of the standard Social and Public Health Sciences Unit colours can be passed as arguments to return a named vector of corresponding hex strings.

Value

A named vector containing the hex codes of all requested colours.

Author(s)

Andy Baxter a.baxter.1@research.gla.ac.uk

Examples

sphsu_cols()
sphsu_cols("University Blue", "Leaf", "Moss")
sphsu_cols(subset = "main")

andrewbaxter439/SPHSUgraphs documentation built on Nov. 4, 2023, 11:52 p.m.