Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

shadepalette

color palette inbetween two extremes


Description

Returns color(s) that are a linear interpolation between two colors

these colors are suitable for shading shapes

Usage

shadepalette(n = 100, endcol = "red", inicol = "white", 
             interval = c(0.0, 1.0))

Arguments

n

number of colors.

endcol

final color.

inicol

initial color.

interval

interval *to* where to interpolate.

Value

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

Author(s)

Karline Soetaert <karline.soetaert@nioz.nl>

See Also

intpalette, grey, femmecol colorRamp for comparable R functions.

Examples

shadepalette(n = 10, "white", "black")
image(matrix(nrow = 1, ncol = 100, data = 1:100),
      col = shadepalette(100, "red", "blue"), main = "shadepalette")

shape

Functions for Plotting Graphical Shapes, Colors

v1.4.5
GPL (>= 3)
Authors
Karline Soetaert <karline.soetaert@nioz.nl>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.