intpalette.RdReturns color(s) that are a linear interpolation of a given set of colors.
intpalette(inputcol, numcol = length(x.to), x.from = NULL, x.to = NULL)a vector of character strings giving the interpolated colors in hexadecimal format
Return value is a vector of *colors* in hexadecimal format.
This is different from colorRamp(R function),
that returns a *function*
greycol, femmecol, shadepalette,
colorRamp for comparable R function
intpalette(c("white", "black"), n = 10)
#> [1] "#FFFFFF" "#E3E3E3" "#C6C6C6" "#AAAAAA" "#8E8E8E" "#717171" "#555555"
#> [8] "#393939" "#1C1C1C" "#000000"
grey(seq(1, 0, length.out = 10))
#> [1] "#FFFFFF" "#E3E3E3" "#C6C6C6" "#AAAAAA" "#8E8E8E" "#717171" "#555555"
#> [8] "#393939" "#1C1C1C" "#000000"
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")