lut_to_palette: A tool that returns a color function/palette from color...

View source: R/minc_vis2D.R

lut_to_paletteR Documentation

A tool that returns a color function/palette from color lookup files

Description

A 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
)

Arguments

lookup_table

Either a path to the lookup table file, or the table itself

alpha

A transparency value between 0 and 1 (inclusive)

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

## Not run: 
spectral.colors <- lut_to_palette(system.file("luts/spectral", package = "RMINC"))
spectral.colors(100)

## End(Not run)

Mouse-Imaging-Centre/RMINC documentation built on Nov. 12, 2022, 1:50 p.m.