Reference Guide > R Routines > RGB_TO_HSV Procedure
  

RGB_TO_HSV Procedure
Standard Library procedure that converts from the RGB color system to the HSV color system.
Usage
RGB_TO_HSV, red, green, blue, h, s, v
Input Parameters
red—Red color value(s). These can be scalar or vectors, whose values are short integers in the range 0 to 255.
green—Green color value(s). This parameter must have the same number of elements as the red input parameter.
blue—Blue color value(s).
Output Parameters
h—The resulting hue value, with the same number of elements as red and whose value is in the range of 0 to 360.
s—The corresponding saturation value in the range of 0 to 1.
v—The value of the corresponding value in the range 0 to 1.
Keywords
None.
Discussion
RGB_TO_HSV converts colors from the RGB (red, green, blue) color system to the HSV (hue, saturation, value) color system.
See Also
COLOR_CONVERT, HSV_TO_RGB, LOADCT, MODIFYCT, TVLCT, WgCeditTool, WgCtTool
For background information about color systems, see the PV‑WAVE User’s Guide.

Version 2017.1
Copyright © 2019, Rogue Wave Software, Inc. All Rights Reserved.