get_shades: Returns shades of colours

View source: R/utilities.R

get_shadesR Documentation

Returns shades of colours

Description

Returns shades of colours

Usage

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

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

Value

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

Examples

## 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)

DImodelsVis documentation built on Aug. 24, 2025, 1:09 a.m.