intpalette: color palettes

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/intpalette.R

Description

Returns color(s) that are a linear interpolation of a given set of colors.

Usage

1
intpalette(inputcol, numcol = length(x.to), x.from = NULL, x.to = NULL)

Arguments

inputcol

initial colors, *from* where to interpolate.

numcol

number of colors to interpolate *to*.

x.from

x-values *from* where to interpolate.

x.to

x-values where to interpolate *to*.

Details

Return value is a vector of *colors* in hexadecimal format.

This is different from colorRamp(R function), that returns a *function*

Value

a vector of character strings giving the interpolated colors in hexadecimal format

Author(s)

Karline Soetaert <[email protected]>

See Also

greycol, femmecol, shadepalette, colorRamp for comparable R function

Examples

1
2
3
4
5
6
7
8
intpalette(c("white", "black"), n = 10)
grey(seq(1, 0, length.out = 10))
image(matrix(nrow = 1,ncol = 100, data = 1:100),
      col = intpalette(c("red", "blue"), numcol = 100),
      main = "intpalette")
image(matrix(nrow = 1, ncol = 100, data = 1:100),
      col = intpalette(c("red", "blue", "yellow"), numcol = 100),
      main = "intpalette")

shape documentation built on Aug. 16, 2017, 9:07 a.m.