painter (version 0.1.0)

GetOpacity: Extract the opacity, hue, saturation or value from a color or vector of colors

Description

These functions simply extact information about a given color or vector of colors, given either as names (e.g. "red") or hex codes (e.g. "FF0000")

Usage

GetOpacity(color)
GetHue(color)
GetSaturation(color)
GetValue(color)

Arguments

color

A color or vector of colors

Value

Numeric value(s) between 0 and 1, with the same length as color

Examples

Run this code
# NOT RUN {
GetValue("red")
GetOpacity("blue")
GetHue(rainbow(100))
# }

Run the code above in your browser using DataLab