RGB to HSV Converter

Color Picker · developer

Convert RGB values to HSV with a fixed input and output format, live preview of the conversion line, and copy-ready results. All processing runs locally in your browser.

Calculator

From: RGB (red, green, blue)

To: HSV (hue, saturation, value)

About RGB

RGB expresses a color as three integers from 0 to 255 for red, green, and blue in the sRGB space. It matches how screens mix light.

About HSV

HSV (also called HSB in some apps) uses hue, saturation (0–100%), and value/brightness (0–100%). It aligns with how many color wheels behave.

How to convert RGB to HSV

Enter a valid RGB value in the calculator. The tool follows the pipeline below: parse your input, hold the color as sRGB (with alpha when relevant), then format the result as HSV.

Accepted shapes include CSS-like functions (e.g. rgb(...), hsl(...)) and compact comma-separated numbers where appropriate. Hex may include or omit the leading #.

Conversion procedure

  1. Parse RGB: accept either a CSS function rgb(r, g, b) or three numbers separated by commas. Whitespace is ignored. Each of R, G, B must be an integer or decimal within 0–255; values outside that range are treated as invalid input.
  2. Resolve to internal sRGB: the three integers are taken as R, G, B directly in sRGB. Alpha is fixed at 1 because plain RGB carries no transparency in this tool.
  3. Build HSV: V = max(R,G,B) (as a 0–100% value after scaling), S = 0 if V = 0, else S = (max − min) / max × 100. Hue uses the same 60° family of cases as the HSL step. Output is integer hue and whole percentages: hsv(h, s%, v%).
  4. Finalize: the result string is what you copy from the calculator. The line under the fields summarizes the path in short form (HSV ← sRGB ← RGB). Rounding is intentional so values read like typical CSS; tiny differences versus other apps can still appear because of integer hue, saturation, lightness/value, or ink percentages.
  5. HSL/HSV reminder: when hue, saturation, and lightness/value are shown as whole numbers, more than one underlying RGB can produce the same text. Typing those integers back into a converter may therefore differ by ±1 from a color you first picked as HEX in the Color Picker—that is expected rounding behavior, not a broken formula.

Example

Input (RGB): 52, 152, 219

Output (HSV): hsv(204, 76%, 86%)

Summary

This page converts RGB input into HSV output. The numbered “Conversion procedure” above is the full breakdown: validation and parsing, conversion to a single internal sRGB (+ alpha) sample, derivation of HSV coordinates from that sample, and final rounding to the strings you see in CSS-oriented tools. The same pipeline runs in your browser as you type.

Relationship context

RGB (red, green, blue) and HSV (hue, saturation, value) are different ways to describe the same sRGB color (except CMYK, which is an approximate ink model). Converting RGB → HSV does not change the underlying color within the limits of each notation; it only changes how numbers are written.

Example conversions

Sample RGB values and the matching HSV output using the same rules as the calculator.

RGB inputHSV output
0, 0, 0hsv(0, 0%, 0%)
255, 255, 255hsv(0, 0%, 100%)
231, 76, 60hsv(6, 74%, 91%)

More color format converters

Other dedicated pages (fixed input and output types). Open the Color Picker for the full list.