hsv_to_rgb
 
 
 

Converts an HSV vector to an RGB vector.

vector hsv_to_rgb(vector hsv)

hsv is a vector representing the hue, saturation, and value components.

Example

hsv_to_rgb(<<1,0.5,0.6>>)

Returns <<0.6, 0.3, 0.3>>.

TipTo see the relationship between HSV and RGB color components, enter the MEL command colorEditor at the Command Line. This displays the Color Chooser window.

In the window’s hexagonal color wheel, drag the pointer to a color of interest. The edit boxes in the window list the color’s values for hue, saturation, and value—and their counterpart red, green, and blue values.

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 a Color Chooser value to the value required by the hsv_to_rgb function, divide it by 360.

When you launch the Color Chooser by entering colorEditor, it’s useful only for learning about color. You can’t use it to change the color of objects in your scene.