powered by
Find thumbnail color
thumbnail_color(path, hex = TRUE)
The color of the thumbnail in hex or rgba
string. Path to the thumbnail PNG
logical. If TRUE then the RGBA values are converted to hex
TRUE
Given a mono-colored thumbnail this function extracts the RGBA channels and returns a vector scaled from [0, 1] or a hex color code.
[0, 1]
path <- system.file("extdata", "test_thumbnail.png", package = "Rigma") thumbnail_color(path)
Run the code above in your browser using DataLab