Call Today 716.688.4675

RGB and HSV/HSI/HSL Color Space Conversion

HSV (hue-saturation-value), HSI (hue-saturation-intensity) and HSL (hue-saturation-lightness) are the three most common cylindrical-coordinate representations of points in an RGB color model. The HSV/HSI/HSL representations rearrange the geometry of RGB in an attempt to be more intuitive and perceptually relevant. The representations HSV, HSI and HSL are very similar, but not completely identical.

rgb-hsv-hsi-coordinate-models

Fig.1 HSV and HSI models (W-white, R-red, M-magenta, B-blue, C-cyan, G-green, Y-yellow)

The hue component H in all three color spaces is an angular measurement, analogous to position around a color wheel. A hue value of 0°corresponds to red,  120° corresponds to green, and 240° corresponds to blue. The saturation component in all three color spaces describes color intensity. A saturation value of 0 (in the middle of a hexagon) means that there is no color (gray). A saturation value at the maximum (at the outer edge of a hexagon) means that the colorfulness value is at maximum for the color defined by the hue. HSV model is called a single hexagon model. The top of the hexagon corresponds to maximum intensity V=1. The maximum saturation is available for maximum intensity. The bottom converges to one point that corresponds the color black. The HSI model is called a double hexagon model. The bottom is similar to HSV but the top also converges to one point that corresponds to the color white. The line between top point and bottom point corresponds to varying shades of gray. For the HSI model, the maximum saturation is available at a medium grey intensity. The HSL model is also a double hexagon model, where lightness is defined as the average of the largest and smallest color components.

rgb-hsv-hsi-hsl-color-conversion

More Information

 

VOCAL Technologies, Ltd.
520 Lee Entrance, Suite 202
Amherst New York 14228
Phone: +1-716-688-4675
Fax: +1-716-639-0713
Email: sales@vocal.com