Learn R Programming

DImodelsVis (version 1.0.1)

get_shades: Returns shades of colours

Description

Returns shades of colours

Usage

get_shades(colours = c("#808080"), shades = 3)

Value

A list consisting of hex codes describing the shades of each colour

Arguments

colours

A character vector of colours recognizable by R, to produces shades of

shades

A numeric vector giving the number of shades for each colour

Examples

Run this code
## Shades for a single colour
get_shades(c("red"))

## Shades for multiple colours
get_shades(c("red", "blue" ,"#A5F8E3", "#808080"), shades = c(2, 3, 4, 5))

## A single value for shade would imply all colours get the same number of shades
get_shades(c("red", "blue" ,"#A5F8E3", "#808080"), shades = 2)

Run the code above in your browser using DataLab