![]() |
VOOZH | about |
rgb2hsv() function in R Language is used to transform colors from RGB space(red / green / blue) into HSV space(hue / saturation / value).
Syntax: rgb2hsv(r, g, b) Parameters: r: vector of ‘red’ values. g: vector of ‘green’ values, or NULL when r is a matrix. b: vector of ‘blue’ values, or NULL when r is a matrix.Example 1: Output:
[, 1] h 0.5641026 s 0.9686275 v 1.0000000Example 2: Output:
[, 1] h 0.5833333 s 0.6666667 v 0.7058824