make.gradient: Make a colour gradient.

Description Usage Arguments Details Value Examples

Description

Make a colour gradient.

Usage

1
2
make.gradient(..., len = 5, fixed = NULL, order = FALSE, plot = TRUE,
  texts = TRUE)

Arguments

...

Color names.

len

Length of the gradient. If more than two colors, the length of the step (A 4-colour gradient with len = 5 gives 15 colours).

fixed

A concatenated string indicating the fixed component(s) of the gradient. One or two components (letters) of either "rgb" or "hsv" can be specified. See details.

order

If TRUE, colours are ordered to make a continuous gradient from dark to light.

plot

Whether to plot the gradient bar. Default TRUE.

texts

Whether to add text labels to the bar. Default TRUE

Details

Examples of valid fixed are "hv", "h", "rg" etc. Two-colour gradient cannot be used in combination with fixed. If only one colour is specified, the colour's position in the gradient is decided by its brightness (if fixed is NULL) or by its value of the first fixed component (if fixed is specified).

Value

A vector of colour names.

Examples

1
2
3
4
make.gradient()
make.gradient("turquoise", fixed = "hv")
make.gradient(cyans[1], blues[9], len = 8)
make.gradient(blues[1], reds[1], yellows[1], cyans[1])

monorunner/smcolors documentation built on May 23, 2019, 6:10 a.m.