![]() |
![]() |
![]() |
![]() |
hsv_to_rgb
Synopsis
convert colors from the hsv color cone to the rgb color cube
module hsv_to_rgb {
float h<NEportLevels={0x2,0x1}>;
float s<NEportLevels={0x2,0x1}>;
float v<NEportLevels={0x2,0x1}>;
float r<NEportLevels={0x1,0x2}>;
float g<NEportLevels={0x1,0x2}>;
float b<NEportLevels={0x1,0x2}>;
method+notify_val+notify_inst method_src = "hsv_to_rgb_proc";
};Input Ports
Output Ports
Description
hsv_to_rgb converts from the hue, saturation, and value (hsv) color cone to the red, green, blue (rgb) color cube. The rgb values are not computed until all three inputs are set.
The HSV Color Cone
All values are in the range 0.0 to 1.0.
Hue is determined by the angle around the cone. The table below shows values with the associated hues:
Saturation is determined by the distance from the center of the cone to the surface. The center (0.0) has no saturation (for example, white) and the surface (1.0) is fully saturated (for example, red). A middle value (0.5) is partially saturated (for example, pink).
Value is determined by the distance from the top of the cone to the base. The top (0.0) has no value (for example, black) and the base of the cone has full value (for example, white). A middle value (0.5) has partial value (for example, grey).
The RGB Color Cube
All values are in the range 0.0 to 1.0.
The RGB color cube is commonly used in computer graphics, because it corresponds directly to the amplitude of the Red, Green, and Blue video signals that drive most computer monitors.
The cube is aligned along the XYZ axes in 3-space. For convenience, the XYZ axes are renamed RGB. Black is at the origin (0,0,0) of the cube. Points along the each axis range from black to the pure color. Diagonally opposite from the origin (1,1,1) is white. Points inside the cube have different saturations and values.
The following colors are associated with the corresponding RGB values:
File
See also related modules
![]() |
![]() |
![]() |
![]() |