thumbnail_color: Find thumbnail color

View source: R/thumbnail_color.R

thumbnail_colorR Documentation

Find thumbnail color

Description

Find thumbnail color

Usage

thumbnail_color(path, hex = TRUE)

Arguments

path

string. Path to the thumbnail PNG

hex

logical. If 'TRUE' then the RGBA values are converted to hex

Details

Given a mono-colored thumbnail this function extracts the RGBA channels and returns a vector scaled from [0, 1] or a hex color code.

Value

The color of the thumbnail in hex or rgba

Examples

path <- system.file("extdata", "test_thumbnail.png", package = "Rigma")
thumbnail_color(path)


Rigma documentation built on Nov. 28, 2022, 1:09 a.m.