Ngl.rgbhsv
Converts from the RGB color space to HSV.
Prototype
h, s, v = Ngl.rgbhsv(r, g, b)
Arguments
r, g, bIntensity values for red, green, and blue in the range [0.1.].
Return values
hRepresents the hue of the input point in HSV color space. A value of (R,0.,0.) in the input space will result in a hue of 0. in the output space.
sThe saturation value of the input point in HSV color space, in the range [0.,1.]. Saturation is a measure of how much white light is mixed with the color. Saturation values of 0. represent grays (with a gray value equal to V). Saturation values of 1. are fully saturated colors. The hue is technically undefined when S=0.; the code leaves H at its previous value when S=0. (0. initially). The fully saturated pure hues occur when S=1. and V=1.
vThe value in HSV space, in the range [0.,1.].
Description
This function converts from the RGB (Red, Green, Blue) color space to the HSV (Hue, Saturation, Value) color space.
See Also
Ngl.hlsrgb, Ngl.hsvrgb, Ngl.rgbhls, Ngl.rgbyiq, Ngl.yiqrgb
Examples
For an example, see the test in color3.py.