Converts colors to and from the RGBcolor system, and either the HLS or HSV systems.
CMY_RGB
HLS_RGB
HSV_RGB
RGB_CMY
RGB_HLS
RGB_HSV
Hue is a floating-point number measured in degrees, from 0.0 to 360.0; a hue of 0.0 degrees is the color red, green is 120.0 degrees, and blue is 240.0 degrees.
Saturation, lightness, and value are floating-point numbers in the range of 0.0 to 1.0.
Note that when RGB values are the same during an RGB to HSV conversion, the saturation is set to 0.0 and the hue is undefined.
COLOR_CONVERT, 255, 255, 0, h, s, v, /RGB_HSV
0,255,255
), which is the color
; yellow at full intensity and saturation, to the HSV system.
PRINT, h, s, v
60.00000 1.00000 1.00000
h
is 60 degrees. The saturation
; and value (s
and v
) are set to 1.0.
For more background information about color systems, see the PV-WAVE User's Guide.