Learn R Programming

RPMG (version 2.2-7)

shade.col: Shaded Color Palette

Description

Create a color palette with two end member colors

Usage

shade.col(n, acol = c(1, 0, 0), bcol = c(1, 1, 1))

Value

color vector

Arguments

n

number of desired colors

acol

rgb, starting color

bcol

rgb, ending color

Author

Jonathan M. Lees<jonathan.lees.edu>

Details

Linear interpolation from color1 to color 2.

See Also

rainbow, tomo.col

Examples

Run this code
##  color palette from red to white
shade.col(100, acol = c(1, 0, 0), bcol = c(1, 1, 1))

Run the code above in your browser using DataLab