rgb_to_hsv


Synopsis

convert colors from the rgb color cube to the hsv color cone


module rgb_to_hsv {
float r<NEportLevels={0x2,0x1}>;
float g<NEportLevels={0x2,0x1}>;
float b<NEportLevels={0x2,0x1}>;
float h<NEportLevels={0x1,0x2}>;
float s<NEportLevels={0x1,0x2}>;
float v<NEportLevels={0x1,0x2}>;
method+notify_val+notify_inst method_src = "rgb_to_hsv_proc";
};

Input Ports

h

Float. A value between 0 and 1 specifying hue.

s

A value between 0 and 1 specifying saturation.

v

A value between 0 and 1 specifying value.

Output Ports

r

Float. A value between 0 and 1 specifying red.

g

Float. A value between 0 and 1 specifying green.

b

Float. A value between 0 and 1 specifying blue.

Description

rgb_to_hsv converts from the red, green, blue (rgb) color cube to the hue, saturation, and value (hsv) color cone. For a description of the hsv color cone and rgb color cube, see See hsv_to_rgb .

The hsv values are not computed until all three inputs are set.

File

v/gmod.v

See also

Related modules:

•      See hsv_to_rgb

•      See rgb_or_hsv