HSV_TO_RGB Procedure

Standard Library procedure that converts colors from the HSV color system to the RGB color system.

Usage

    HSV_TO_RGB, h, s, v, red, green, blue

Input Parameters

h—Hue variable. May be either vector or scalar, in the range of 0 to 360.

s—Saturation variable. Must be same dimension as h, in the range of 0 to 1.

v—Value variable. Must be the same dimension as h, in the range 0 to 1.

Output Parameters

red—Red color output value(s). Will be short integer(s), the same dimension as h, and in the range of 0 to 255.

green—Green color output value(s). Will be short integer(s), the same dimension as h, and in the range of 0 to 255.

blue—Blue color output value(s). Will be short integer(s), the same dimension as h, and in the range of 0 to 255.

Keywords

None.

Discussion

HSV_TO_RGB provides a convenient way to convert from the HSV (hue, saturation, value) color system to the RGB (red, green, blue) color system. Most output devices capable of displaying color use the RGB color system.

Example

The statement:

HSV_TO_RGB, 0, 1, 1, red, green, blue

returns red=255, green=0, blue=0. You can use the red, green, and blue values to set color table values with the TVLCT procedure.

See Also

COLOR_CONVERT, HLS, HSV, LOADCT, MODIFYCT, RGB_TO_HSV, TVLCT, WgCeditTool, WgCtTool

For more information, see PV‑WAVE User Guide.