RGB to HSV Converter
Set red, green and blue from 0 to 255 with sliders or number boxes, or paste a HEX code. Hue, saturation and value update instantly, with a bar for each value and a choice of 0, 1 or 2 decimal places.
Convert RGB to HSV with live preview, sliders, OpenCV format and batch conversion. Free and no signup.
One color per line, as 102 153 204, 102, 153, 204, rgb(102, 153, 204) or #6699CC. Up to 500 colors.
| Color | RGB | H | S | V |
|---|
Drag the sliders, type the numbers or paste a HEX code.
Hue, saturation and value update as you type, with a live color preview.
Copy HSV in design, 0–1 or OpenCV format, or convert a whole list in bulk.
Screens and image files store colors as red, green and blue numbers, but people think about color differently: which color is it, how vivid is it and how bright is it. That is exactly what HSV, also called HSB, describes. Our free RGB to HSV converter turns any RGB color into hue, saturation and value the moment you type or drag, with a live preview and one-click copy. The same page shows the result in three common formats: the design format with hue in degrees and percentages, the 0 to 1 format used by Python's colorsys, and the OpenCV 8-bit format with hue from 0 to 179. It also gives you the matching HEX, HSL and CMYK values, so it works as a complete RGB to HSB, RGB to HEX and color code converter for designers, developers, students and anyone working with images. Need to convert many colors? Paste a list into the bulk converter and download every HSV value as a CSV file. Everything runs inside your browser, so there is no signup, no upload and no watermark.
Set red, green and blue from 0 to 255 with sliders or number boxes, or paste a HEX code. Hue, saturation and value update instantly, with a bar for each value and a choice of 0, 1 or 2 decimal places.
Convert up to 500 colors in one go. Paste lines such as 102 153 204, rgb(102, 153, 204) or a HEX code, review each color with its swatch, and copy or download the HSV values as a CSV file.
Get the fractional 0 to 1 values used by Python's colorsys and the 8-bit values used by OpenCV in one click, so you can paste colors straight into scripts for image processing and color detection.
Converting RGB to HSV takes a few seconds and works the same on a phone, tablet or computer. Follow these steps to turn red, green and blue numbers into hue, saturation and value.
You can also share a color by adding it to the page address, for example ?r=102&g=153&b=204, so a teammate opens the tool with the same color already loaded.
HSV describes a color with three numbers that match how we talk about color. Many tools, including Adobe Photoshop, call the same model HSB, where B stands for brightness, and the numbers are identical.
Value in HSV is simply the largest of the three RGB numbers, scaled to a percentage. That is why pure red, pure green and pure blue all have a value of 100 percent.
The conversion uses the largest and smallest of the three channels. Here is the standard method with the example RGB 102, 153, 204.
For red as the maximum, hue is 60 × (((G − B) ÷ delta) mod 6), and for green as the maximum, it is 60 × ((B − R) ÷ delta + 2). If all three channels are equal, delta is 0 and the hue is set to 0, since a gray has no hue. The result for this example is HSV 210°, 50%, 80%, which is the HEX color #6699CC.
This chart shows the HSV values the standard formula gives for popular colors, rounded to whole numbers. The converter above handles any other combination.
| Color | RGB | HEX | H | S | V |
|---|---|---|---|---|---|
| Red | 255, 0, 0 | #FF0000 | 0° | 100% | 100% |
| Yellow | 255, 255, 0 | #FFFF00 | 60° | 100% | 100% |
| Green (lime) | 0, 255, 0 | #00FF00 | 120° | 100% | 100% |
| Cyan | 0, 255, 255 | #00FFFF | 180° | 100% | 100% |
| Blue | 0, 0, 255 | #0000FF | 240° | 100% | 100% |
| Magenta | 255, 0, 255 | #FF00FF | 300° | 100% | 100% |
| Orange | 255, 128, 0 | #FF8000 | 30° | 100% | 100% |
| Gray | 128, 128, 128 | #808080 | 0° | 0% | 50% |
| White | 255, 255, 255 | #FFFFFF | 0° | 0% | 100% |
| Black | 0, 0, 0 | #000000 | 0° | 0% | 0% |
Notice that gray, white and black all have a saturation of 0 and a hue of 0. The hue value is only a placeholder in those cases, because colors with no saturation have no real hue.
The same color can be written with different number ranges depending on where you use it. This is a common source of bugs when moving a color from a design tool into code, so always check the range your tool expects.
| Tool or format | Hue | Saturation | Value | Example for 210°, 50%, 80% |
|---|---|---|---|---|
| Design tools (Photoshop HSB, color pickers) | 0–360 | 0–100% | 0–100% | 210, 50, 80 |
| Python colorsys | 0–1 | 0–1 | 0–1 | 0.5833, 0.5, 0.8 |
| OpenCV (8-bit images) | 0–179 | 0–255 | 0–255 | 105, 128, 204 |
OpenCV stores hue in half degrees so that it fits into 8 bits, which is why its hue is the degree value divided by 2. Our converter shows all three formats side by side, so you can copy the one your project uses.
All of these describe the same screen colors in different ways. Choosing the right one makes each job easier.
| Model | How it describes color | Best used for | Example |
|---|---|---|---|
| RGB | Red, green and blue light levels | Screens, apps, digital images | rgb(102, 153, 204) |
| HSV / HSB | Hue, saturation and value (brightness) | Color pickers, color detection, adjusting by eye | hsv(210, 50%, 80%) |
| HSL | Hue, saturation and lightness | CSS, making lighter and darker shades | hsl(210, 50%, 60%) |
| HEX | RGB written in base 16 | Websites, CSS, UI design | #6699CC |
HSV and HSL share the same hue, but their saturation and third value differ. In HSV, a value of 100% with full saturation is the purest color, while in HSL that same color sits at 50% lightness. Convert between them rather than copying numbers across.
RGB is how colors are stored, but HSV is often easier to work with. These are the common situations where an RGB to HSV conversion helps.
Our RGB to HSV converter runs in your web browser, so it works on Windows, Mac, Linux, Android and iPhone without installing anything. Whether you search for an RGB to HSB converter, an RGB to HSV tool for OpenCV or a quick way to turn pixel values into hue, saturation and value, the steps are the same: open the page, enter the numbers and copy the result. The conversion happens locally in your browser, so the colors you enter are not uploaded anywhere.
Python includes the function you need. Divide each channel by 255 and call colorsys.rgb_to_hsv(r/255, g/255, b/255). The result has three numbers from 0 to 1. Multiply the first by 360 for degrees, and the other two by 100 for percentages. For rgb(102, 153, 204), this gives a hue of 210 degrees, saturation of 50% and value of 80%.
To write the conversion yourself, divide the channels by 255, find the largest and smallest values, and store their difference as delta. Value equals the largest channel. Saturation is delta divided by the largest channel, or zero for black. Hue depends on which channel is largest, is multiplied by 60 degrees, and has 360 added when the result is negative. When delta is zero the color is a gray and hue is normally set to 0. Round only at the end to keep precision.
OpenCV loads color images in BGR order, so use the cv2.COLOR_BGR2HSV code for those images. For 8 bit images, hue runs from 0 to 179, which is half of the degree value, while saturation and value run from 0 to 255.
cv2.inRange, not a single exact color.| HSV value | What it looks like | RGB |
|---|---|---|
| hsv(210, 100%, 100%) | Fully saturated bright blue | rgb(0, 128, 255) |
| hsv(210, 50%, 100%) | Lighter, softer blue | rgb(128, 191, 255) |
| hsv(210, 100%, 50%) | Darker blue | rgb(0, 64, 128) |
| hsv(210, 0%, 50%) | Neutral gray | rgb(128, 128, 128) |
| hsv(210, 100%, 0%) | Black | rgb(0, 0, 0) |
HSV is convenient when a color needs to cycle through the rainbow: keep saturation and value fixed and increase the hue over time. Game engines, LED libraries and animation tools may expect hue as degrees, as a decimal from 0 to 1 or as a number from 0 to 255. Check the documentation before copying values. When blending two hues in code, take the shorter way around the circle, or the animation may pass through colors you did not expect.
Start from a web code with the HEX to HSV Converter, convert the same channels with the RGB to HSL Converter, or get a HEX string from the RGB to HEX Converter.
Our free RGB to HSV converter was built to make color conversion simple for everyone. Enter your RGB values, get clear hue, saturation and value numbers in the format you need, and keep working, with no signup and no limits. If you also need web or print values, try our HSV to HEX and HEX to CMYK converters and explore the other free tools on our site.
Quick answers about converting RGB color values to HSV and HSB.
Enter the red, green and blue values (0–255) in the converter, or paste a HEX code. The tool finds the largest and smallest channel, sets value to the largest, calculates saturation from the difference, and works out the hue from which channel is largest. The result appears instantly and can be copied in several formats.
In design tools, hue is 0 to 360 degrees, and saturation and value are 0 to 100 percent. Python's colorsys uses 0 to 1 for all three, and OpenCV uses 0 to 179 for hue and 0 to 255 for saturation and value on 8-bit images. The converter shows all three formats.
OpenCV stores 8-bit images with values from 0 to 255, and a hue of up to 360 would not fit. It therefore halves the hue, giving a range of 0 to 179. To convert, divide the hue in degrees by 2, and scale saturation and value from percentages to 0–255.
Yes. HSV (hue, saturation, value) and HSB (hue, saturation, brightness) are two names for the same color model, with identical numbers. Adobe Photoshop and several design tools say HSB, while programming libraries and textbooks usually say HSV.
When red, green and blue are equal, the color has no dominant hue, so the formula has nothing to measure. Converters set the hue to 0 in that case, and the saturation is 0. The hue number is just a placeholder and does not affect how the color looks.
Yes. Use the bulk converter to paste up to 500 colors, one per line, written as 102 153 204, 102, 153, 204, rgb(102, 153, 204) or a HEX code with a hash sign. Each valid line shows a swatch with its H, S and V values, and you can copy the table as CSV or download it as a file.
Yes, it is free and needs no account. The conversion runs entirely in your browser, so the color values you enter are not uploaded to a server. You can use it as often as you like for personal and commercial projects.
Convert RGB to HSV, pick colors from images, generate color palettes or check color contrast in seconds. Explore free color tools to find, convert and perfect all your colors in one place.
Explore All Color Tools →