How to use the rgb to hsv converter
- Enter the red, green and blue channel values from 0 to 255.
- The converter calculates the results immediately as you type.
- Read the hue in degrees, saturation and value as percentages.
- Copy the hex code for use in CSS or design tools.
How the RGB to HSV conversion works
The algorithm first normalizes the red, green and blue channels by dividing each by 255. It then finds the maximum (Cmax) and minimum (Cmin) of those three values. The difference between them is the chroma (delta).
Value (V) is simply Cmax. Saturation (S) is delta divided by Cmax, or zero when Cmax is zero. Hue (H) depends on which channel is largest:
- If delta is zero, hue is 0 degrees.
- If red is max: H = 60 x (((G - B) / delta) mod 6)
- If green is max: H = 60 x (((B - R) / delta) + 2)
- If blue is max: H = 60 x (((R - G) / delta) + 4)
For example, converting pure blue (R=0, G=0, B=255): normalized values are 0, 0, 1. Cmax is 1, Cmin is 0, delta is 1. V = 1 (100%). S = 1/1 = 1 (100%). Blue is max, so H = 60 x ((0 - 0)/1 + 4) = 240 degrees.
Common RGB to HSV reference values
This table shows standard colors converted from RGB to HSV. Use it to verify your own calculations or as a quick lookup.
| Color | RGB | Hue | Saturation | Value |
|---|---|---|---|---|
| Red | 255, 0, 0 | 0° | 100% | 100% |
| Yellow | 255, 255, 0 | 60° | 100% | 100% |
| Green | 0, 255, 0 | 120° | 100% | 100% |
| Cyan | 0, 255, 255 | 180° | 100% | 100% |
| Blue | 0, 0, 255 | 240° | 100% | 100% |
| Magenta | 255, 0, 255 | 300° | 100% | 100% |
| White | 255, 255, 255 | 0° | 0% | 100% |
| Black | 0, 0, 0 | 0° | 0% | 0% |
| Gray (50%) | 128, 128, 128 | 0° | 0% | 50.2% |
HSV versus HSB versus HSL
HSV and HSB are two names for the exact same color model. Hue represents the color angle on the wheel, saturation describes how vivid the color is, and value (or brightness) indicates how much light the color emits. If you search for an rgb to hsb converter, this tool gives you the identical result.
HSL (Hue, Saturation, Lightness) is a different model. While hue is the same, lightness is calculated as the average of the maximum and minimum channels rather than just the maximum. A fully saturated color in HSL has a lightness of 50%, whereas in HSV it has a value of 100%. You can use the RGB to HSL converter if you need that model instead.
Practical uses for HSV in design and development
Designers often prefer HSV over RGB because it separates the color identity (hue) from its intensity (saturation) and brightness (value). This makes building color palettes straightforward: pick a base hue, then create variations by adjusting saturation and value while keeping the hue constant.
In CSS, the hsv() function is not natively supported, but many preprocessors and JavaScript libraries accept HSV input and convert it behind the scenes. Graphic software like Photoshop, Figma and GIMP all offer HSV sliders alongside RGB fields. When you need the web-safe format, copy the hex output from this tool or use a dedicated RGB to hex converter.
Edge cases and common mistakes
A frequent error is entering RGB values outside the 0 to 255 range. Each channel must be an integer within that interval. Another mistake is confusing HSV with HSL: setting saturation to 100% and value to 50% in HSV does not produce the same color as 100% saturation and 50% lightness in HSL.
When all three RGB channels are equal, the color is a shade of gray. In that case, saturation is always 0% and hue is conventionally set to 0 degrees because there is no dominant wavelength. Black (0, 0, 0) has a value of 0%, meaning hue and saturation become mathematically undefined; the converter reports them as 0 for consistency.
Worked examples
| Example | Input | Result |
|---|---|---|
| Pure red | Red (0-255): 255; Green (0-255): 0; Blue (0-255): 0 | Hue: 0°; Saturation: 100%; Value: 100%; Hex: #FF0000; Note: HSB is the same model as HSV. |
| White | Red (0-255): 255; Green (0-255): 255; Blue (0-255): 255 | Hue: 0°; Saturation: 0%; Value: 100%; Hex: #FFFFFF; Note: HSB is the same model as HSV. |
| Google blue | Red (0-255): 66; Green (0-255): 133; Blue (0-255): 244 | Hue: 217.4°; Saturation: 73%; Value: 95.7%; Hex: #4285F4; Note: HSB is the same model as HSV. |
| Dark gray | Red (0-255): 64; Green (0-255): 64; Blue (0-255): 64 | Hue: 0°; Saturation: 0%; Value: 25.1%; Hex: #404040; Note: HSB is the same model as HSV. |
FAQ
Is HSV the same as HSB?
Yes. HSV stands for Hue, Saturation, Value and HSB stands for Hue, Saturation, Brightness. They describe the exact same color model, just with different terminology for the third component.
Why is hue measured in degrees?
Hue maps to a position on the color wheel, which is a circle of 360 degrees. Red sits at 0 (and 360), green at 120 and blue at 240.
What happens when I convert black to HSV?
Black has RGB values of 0, 0, 0. Its value is 0% and saturation is 0%. Hue is technically undefined because there is no color information, but most systems report it as 0 degrees.
Can I enter hex codes into this converter?
This tool accepts numeric RGB channels from 0 to 255. If you have a hex code, use a hex to RGB converter first, then enter the resulting values here.
How do I convert HSV back to RGB?
You reverse the algorithm: compute chroma from value and saturation, find an intermediate point based on the hue sector, add a lightness offset and scale back to 0-255. Many design tools handle this automatically.
Does this tool upload my color data?
No. The entire calculation runs in your browser. No color values are sent to any server.