stam.rgb.colors {stam}R Documentation

Generate a Color Gradient

Description

Generates a colur gradient starting from one color given by the user and ending in another going through black.

Usage

stam.rgb.colors(n = 12, m = 1, r0 = 1, g0 = 0, b0 = 0, 
                r1 = 0, g1 = 1, b1 = 0)

Arguments

n Number of shades generated in the color gradient
m skewing factor. m=1 produces a linear gradient from start to black and from black to end. High m decreases the amount of black, low m's increase it.
r0 red component of the starting color
g0 green component of starting color
b0 blue component of the starting color
r1 red component of the ending color
g1 green component of the ending color
b1 blue component of the ending color

Value

A charactor vector of length 2*n. Each element represents the code of an RGB color.

Author(s)

Claudio Lottaz

See Also

image.stamPrediction

Examples

red.to.blue <- stam.rgb.colors(10, 1, 1, 0, 0, 0, 0, 1)
fake.data <- matrix(seq(0, 1, 0.01), nrow=10, ncol=10)
image(fake.data, col=red.to.blue)

[Package stam version 1.10.0 Index]