About the RGB to HSV Converter
An RGB triple tells you how much red, green and blue light a pixel emits, which is exactly what a screen needs and exactly what a person cannot reason about. Nothing in rgb(31, 193, 107) hints that the colour is a green. HSV rearranges the same information into one number for the hue angle and two for how intense and how bright the colour is, which is why eyedroppers, image editors and computer vision libraries all report it.
The arithmetic is short. Value is the largest of the three channels divided by 255. Saturation is the gap between the largest and smallest channel divided by the largest. Hue comes from whichever channel is on top and how far the other two sit either side of it. When all three channels are equal the gap is zero, so a pure grey has no hue to report and both the hue and the saturation come back as 0.
The input pane accepts rgb() and rgba() wrappers, bare comma separated triples, and percentage channels. Send a batch through by putting one colour on each line. For stylesheet work, RGB to HSL produces a value CSS actually accepts, and HSV to RGB reverses this conversion.
How to use
- Paste RGB values, one colour per line, with or without the rgb() wrapper.
- Press Convert.
- Read the hue in degrees and the saturation and value as percentages.
Common questions
- Do I have to include the rgb() wrapper?
- No, a bare triple such as 47, 111, 237 is understood, and percentage channels are accepted too.
- What ranges do the outputs use?
- Hue runs from 0 to 360 degrees, while saturation and value are percentages from 0 to 100.
- Why is HSV preferred in image processing?
- Isolating an object by colour needs a single hue band, which HSV provides but RGB does not.
- Does rgba() input keep its alpha?
- The alpha is accepted and then ignored, as HSV has only three components.