combined.color: Combined rainbow and desaturation color scale

combined.colorR Documentation

Combined rainbow and desaturation color scale

Description

Returns a color vector of rainbow colors which are desaturated by 's' and darkened by 'v' to obtain the "combined" color scale.

Usage

combined.color(
  n,
  colStart = "white",
  colEnd = NA,
  nStart = 0,
  nEnd = floor(n/5),
  s = c(0.3, 1),
  v = c(1, 0.7),
  start = 0.8,
  end = 0,
  flip = FALSE,
  alpha = 1,
  ...
)

Arguments

n

The number of colors to generate.

colStart

The first color, appended to the color scale, possibly repeated nStart times.

colEnd

The last color, appended to the color scale, possibly repeated nSEnd times.

nStart

The number of repeated colStart.

nEnd

The number of repeated colEnd.

s

The range of the saturation values applied to the colors, where lower values suppress saturation. The default applies less strong colors at the higher values of x.

v

The range of the value applied to the colors, where lower values causes darker colors. The default applies less darker colors at the lover values of x.

start

The start hue, given as a value in between 0 and 1.

end

The end hue, given as a value in between 0 and 1.

flip

Logical: If TRUE the color scale should be reversed.

alpha

The transparency.

...

Not used, but allowing for unused arguments.

Examples

## Not run: 
plot(1:10, 1:10, pch = 19, cex = 10, col = combined.color(10))
plot(1:10, 1:10 + 1, pch = 19, cex = 10, col = combined.color(10, flip=TRUE))

## End(Not run)

StoXProject/RstoxBase documentation built on Nov. 6, 2024, noon