rgb_to_hsv

 
 
 

Converts an RGB vector to an HSV vector.

vector rgb_to_hsv(vector rgb)

rgb is a vector representing the red, green, and blue components.

The Hue value in the Color Chooser has a range of 0 to 360, while the H component of an HSV vector has a corresponding range of 0 to 1. To convert the rgb_to_hsv function’s return value to the corresponding Color Chooser value, multiply it by 360.

Beginning Extension for Maya 2013, the Hue value has a range of 0.000 to 360.000.

Example

rgb_to_hsv(<<0.6,0.6, 0.6>>)

Returns <<0, 0, 0.6>>.