This content is licensed under Creative Commons Attribution/Share-Alike License 3.0 (Unported). That means you may freely redistribute or modify this content under the same license conditions and must attribute the original author by placing a hyperlink from your site to this work https://planetcalc.com/5788/. Also, please do not modify any references to the original work (if any) contained in this content.
This calculator converts RGB color to HSV color and vice versa. Some theory is below the calculator.
The RGB color model is an additive color model in which red, green and blue light are added together in various ways to reproduce a broad array of colors. The model's name comes from the initials of the three additive primary colors, red, green, and blue.
Color in the RGB color model is described by indicating how much of each of the red, green, and blue is included. The color is expressed as an RGB triplet (r,g,b), each component of which can vary from zero to a defined maximum value. If all the components are at zero, the result is black; if all are at maximum, the result is the brightest representable white.
In computers, the component values are often stored as integer numbers in the range 0 to 255, the range that a single 8-bit byte can offer. These are often represented as either decimal or hexadecimal numbers.
Since three components usually define colors, a three-dimensional volume is described by treating the component values as ordinary cartesian coordinates in a euclidean space. For the RGB model, this is represented by a cube using non-negative values within a 0–1 range, assigning black to the origin at the vertex (0, 0, 0), and with increasing intensity values running along the three axes up to white at the vertex (1, 1, 1), diagonally opposite black.
An RGB triplet (r,g,b) represents the three-dimensional coordinate of the point of the given color within the cube or its faces or along its edges. This approach allows computations of the color similarity of two given RGB colors by simply calculating the distance between them: the shorter the distance, the higher the similarity.
HSV is one of the most common cylindrical-coordinate representations of points in an RGB color model. The representation rearranges the geometry of RGB to be more intuitive and perceptually relevant than the cartesian (cube) representation. Developed in the 1970s for computer graphics applications, HSV is used today in color pickers, image editing software and less commonly in image analysis and computer vision.
HSV stands for hue, saturation, and value and is often called HSB (B for brightness).
In a cylinder, the angle around the central vertical axis corresponds to "hue", the distance from the axis corresponds to "saturation", and the distance along the axis corresponds to "value" or "brightness".