RGBHSV
RGBHSV refers to the relationship between the RGB and HSV color models in digital imaging. RGB represents colors as a mix of red, green, and blue light, typically with integer components in the range 0 to 255 on 8-bit channels. HSV, also known as HSB, expresses color in terms of hue (the type of color, usually 0 to 360 degrees), saturation (colorfulness, 0 to 1 or 0 to 100%), and value or brightness (0 to 1 or 0 to 100%). The two models serve different purposes: RGB aligns with how displays mix light, while HSV aligns more closely with human color perception and intuitive color selection.
Conversions between RGB and HSV are routinely performed in graphics, image processing, and computer vision. In
- if max = r, H = (g − b) / d + (g < b ? 6 : 0)
- if max = g, H = (b − r) / d + 2
- if max = b, H = (r − g) / d + 4
Then H is multiplied by 60 to convert to degrees. For HSV to RGB, compute C = V
Applications include color pickers, image editing, and color-based segmentation. Limitations include non-perceptual uniformity of HSV and