A pleasing rainbow style color table patterned after that used in Matlab.

tim.colors(n = 64)

Arguments

n

is the number of color levels (default = 64).

Value

A vector of character strings giving the colors in hexadecimal format.

Details

Based on the tim.colors function in the fields package. The tim.colors function here has been modified to break any dependence on code in the fields package. Spline interpolation (interpSpline) is used when the number of requested colors is not the default.

See also

Author

Tim Hoar (GSP-NCAR); modified by Brandon Whitcher

Examples


tim.colors(10) 
#>  [1] "#00008F" "#0000FF" "#0070FF" "#00DFFF" "#50FFAF" "#BFFF40" "#FFCF00"
#>  [8] "#FF6000" "#EF0000" "#800000"
image(outer(1:20, 1:20, "+"), col=tim.colors(75), main="tim.colors")