A tool that returns a color function/palette from color lookup files
Source:R/minc_vis2D.R
lut_to_palette.RdA tool that returns a color function/palette from color lookup files
Usage
lut_to_palette(
lookup_table = system.file("luts/spectral", package = "RMINC"),
alpha = 1
)Value
A function that takes in an integer specifying the number of colours required, and returns a vector of colours interpolated from the input colour lookup file
Note
For now, the first column of the lookup table (interval where the colour occurs) is ignored; i.e. equal spacing intervals are assumed
Examples
if (FALSE) { # \dontrun{
spectral.colors <- lut_to_palette(system.file("luts/spectral", package = "RMINC"))
spectral.colors(100)
} # }