lut_to_palette | R Documentation |
A tool that returns a color function/palette from color lookup files
lut_to_palette(
lookup_table = system.file("luts/spectral", package = "RMINC"),
alpha = 1
)
lookup_table |
Either a path to the lookup table file, or the table itself |
alpha |
A transparency value between 0 and 1 (inclusive) |
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
For now, the first column of the lookup table (interval where the colour occurs) is ignored; i.e. equal spacing intervals are assumed
## Not run:
spectral.colors <- lut_to_palette(system.file("luts/spectral", package = "RMINC"))
spectral.colors(100)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.