Learn R Programming

Rigma (version 0.3.0)

thumbnail_color: Find thumbnail color

Description

Find thumbnail color

Usage

thumbnail_color(path, hex = TRUE)

Value

The color of the thumbnail in hex or rgba

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.

Examples

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

Run the code above in your browser using DataLab