Skip to content

RGB to HSV Converter

Convert RGB to HSV with live preview, sliders, OpenCV format and batch conversion. Free and no signup.

  • 100% free
  • No Signup
  • Instant results

RGB values

#6699CC

Quick colors
Decimal places

Bulk RGB to HSV converter

One color per line, as 102 153 204, 102, 153, 204, rgb(102, 153, 204) or #6699CC. Up to 500 colors.

ADVERTISEMENT
Demo Ad 728 x 90 320 x 100

How to convert RGB to HSV

  1. 1

    Enter R, G and B

    Drag the sliders, type the numbers or paste a HEX code.

  2. 2

    See HSV instantly

    Hue, saturation and value update as you type, with a live color preview.

  3. 3

    Copy the format

    Copy HSV in design, 0–1 or OpenCV format, or convert a whole list in bulk.

COLOR CONVERSION GUIDE

RGB to HSV Converter – Convert RGB Values to HSV or HSB Online Free

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.

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.

Bulk RGB to HSB Conversion

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.

Code-Ready HSV Formats

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.

How to Convert RGB to HSV Online (Step by Step)

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.

  1. Enter the RGB values: Type numbers from 0 to 255 for red, green and blue, drag the sliders, use the color picker or paste a HEX code.
  2. Choose the precision: Pick 0, 1 or 2 decimal places for the hue, saturation and value.
  3. Read the HSV result: Hue appears in degrees from 0 to 360, and saturation and value appear as percentages.
  4. Pick the format you need: Copy the design format, the 0 to 1 fractions, the OpenCV values, or the HSB, HSL, HEX and CMYK versions.
  5. Convert many colors at once (optional): Paste a list into the bulk converter and download the CSV.

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.

What Is HSV (HSB)? Hue, Saturation and Value Explained

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.

  • Hue (H): The base color on the color wheel, in degrees from 0 to 360. Red is at 0, green at 120 and blue at 240.
  • Saturation (S): How pure the color is. At 0 percent it is a shade of gray, and at 100 percent it is the most vivid version of the hue.
  • Value (V): How bright the color is, from 0 percent (black) to 100 percent (the brightest version of the color).

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.

How RGB to HSV Conversion Works (Formula and Example)

The conversion uses the largest and smallest of the three channels. Here is the standard method with the example RGB 102, 153, 204.

  1. Scale R, G and B to 0–1: Divide each by 255 to get R = 0.4, G = 0.6 and B = 0.8.
  2. Find the maximum and minimum: Max = 0.8 and min = 0.4, so the difference (delta) is 0.4.
  3. Value: V = max = 0.8, which is 80%.
  4. Saturation: S = delta ÷ max = 0.4 ÷ 0.8 = 0.5, which is 50%. If max is 0, saturation is 0.
  5. Hue: The formula depends on which channel is largest. When blue is the maximum, H = 60 × ((R − G) ÷ delta + 4) = 60 × (−0.5 + 4) = 210°.

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.

Common RGB to HSV Color Chart

This chart shows the HSV values the standard formula gives for popular colors, rounded to whole numbers. The converter above handles any other combination.

RGB to HSV values for common colors
Color RGB HEX H S V
Red255, 0, 0#FF00000°100%100%
Yellow255, 255, 0#FFFF0060°100%100%
Green (lime)0, 255, 0#00FF00120°100%100%
Cyan0, 255, 255#00FFFF180°100%100%
Blue0, 0, 255#0000FF240°100%100%
Magenta255, 0, 255#FF00FF300°100%100%
Orange255, 128, 0#FF800030°100%100%
Gray128, 128, 128#8080800°0%50%
White255, 255, 255#FFFFFF0°0%100%
Black0, 0, 0#0000000°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.

HSV Ranges in Design Tools, Python and OpenCV

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.

HSV number ranges by tool
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.

RGB vs HSV vs HSL vs HEX: What Is the Difference?

All of these describe the same screen colors in different ways. Choosing the right one makes each job easier.

Color models compared
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.

When Do You Need to Convert RGB to HSV?

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.

  • Computer vision and image processing: Detecting an object by color is often easier in HSV than in RGB, because the hue stays similar when lighting changes. Libraries such as OpenCV work with HSV for this reason.
  • Color pickers and design tools: Read an RGB color from an image and see its hue, saturation and brightness.
  • Palette creation: Convert a base color to HSV, rotate the hue, and keep the saturation and value to build a balanced palette.
  • Game development and graphics: Adjust brightness or saturation of a color in code without changing its hue.
  • Accessibility and contrast: Change the value of a color to make text more readable.
  • Data visualization: Generate evenly spaced hues for charts, starting from RGB brand colors.
  • Teaching and learning: See how the three RGB numbers relate to the hue, saturation and brightness you see.

Tips for Working With HSV Values

  • Check the range first: Confirm whether your tool wants hue as 0–360, 0–1 or 0–179 before pasting numbers.
  • Expect hue 0 for grays: When saturation is 0, the hue carries no meaning, so ignore it.
  • Make shades and tints easily: Lower the value for darker shades, and lower the saturation for softer tints.
  • Handle the hue wrap-around: Hue 360 equals hue 0, so treat both as red when comparing colors.
  • Use a tolerance for color detection: Search a range of hue, saturation and value rather than exact numbers.
  • Round only at the end: Keep decimals while calculating and round when you present or store the final values.

Convert RGB to HSV on Any Device, No Software Needed

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.

RGB to HSV in Python With colorsys

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%.

RGB to HSV in JavaScript

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 HSV Color Detection Tips

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.

  • Use ranges: Match a band of hue, saturation and value with cv2.inRange, not a single exact color.
  • Handle red: Red sits near both ends of the hue scale, so combine two masks.
  • Test real lighting: Shadows, glare and camera settings change the measured values.
  • Skip weak colors: A minimum saturation and value can reduce noise from grays and dark pixels.

How Hue, Saturation and Value Change a Color

Effect of saturation and value on one hue
HSV valueWhat it looks likeRGB
hsv(210, 100%, 100%)Fully saturated bright bluergb(0, 128, 255)
hsv(210, 50%, 100%)Lighter, softer bluergb(128, 191, 255)
hsv(210, 100%, 50%)Darker bluergb(0, 64, 128)
hsv(210, 0%, 50%)Neutral grayrgb(128, 128, 128)
hsv(210, 100%, 0%)Blackrgb(0, 0, 0)

RGB to HSV for Game Development, LEDs and Animation

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.

Troubleshooting RGB to HSV Results

  • Numbers differ by a scale: Another tool may use 0 to 1, 0 to 255 or half degrees.
  • Hue differs slightly: Rounding to whole numbers can change the last digit.
  • HSL does not match: Lightness and value are calculated differently, so they are not interchangeable.
  • Image detection fails: Confirm the channel order and use wider ranges.

Related RGB and HSV Tools

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.

Free RGB to HSV Color Converter: Fast, Accurate and Simple

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.

ADVERTISEMENT
Demo Ad 300 x 250 300 x 250
COMMON QUESTIONS

RGB to HSV Converter FAQ

Quick answers about converting RGB color values to HSV and HSB.

How do I convert RGB to HSV?

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.

What are the ranges for hue, saturation and value?

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.

Why is the hue different in OpenCV?

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.

Is HSV the same as HSB?

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.

Why is the hue 0 for gray, white and black?

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.

Can I convert multiple RGB values to HSV at once?

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.

Is this RGB to HSV converter free and safe to use?

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.

ADVERTISEMENT
Demo Ad 728 x 90 320 x 100