vec2hsv: Vector to HSV conversion

Description Usage Arguments Details Value Examples

View source: R/clusterluts.R

Description

Wrapper for hsv that allows using it with a 3-element vector [h, s, v].

Usage

1

Arguments

v

a 3-element vector with the values for h, s, and v

...

ignored

Details

Rather than returning a hex representation as done in hsv, a conversion to RGB is performed before returning.

Value

an RGB vector (1-column color matrix) representing the color

Examples

1
2
# convert RGB colors to HSV and back
show.lut(apply(apply(col2rgb(rainbow(6, e=5/6)), 2, rgb2hsv), 2, vec2hsv))

bennop/clusterLUTs documentation built on Nov. 21, 2020, 9:07 a.m.