HEX to HSV Converter
WM-46Paste hex color codes and get the HSV (also called HSB) values: hue in degrees, saturation and value in percent. HSV can be turned back into hex.
Runs in your browser. Nothing is uploaded.
Hex colors, one per line (#ff8800, #f80 or #ff880080)
HSV
How to use it
- Type or paste one hex color per line, such as #ff8800 or #f80.
- Choose the HSV style and how many decimals to show.
- Press Hex to HSV.
- Copy the result, or press HSV to hex to go the other way.
Reading the result
Hue is the position on the color wheel from 0 to 360 degrees, saturation is how far the color is from gray, and value is how bright it is. The code #ff8800 is hsv(32, 100%, 100%). HSV and HSB are the same model under two names. Hex codes can have 3, 4, 6 or 8 digits and the # is optional. A color with alpha keeps it as a fourth value.
Limits of the conversion
The values are rounded to whole degrees and percent by default, or to 1 or 2 decimals if you choose, so converting back may not return exactly the starting hex. HSV is not a CSS color function, so browsers do not understand hsv(). Use hex or rgb() in a stylesheet and keep HSV for design tools and code that asks for it. Other color forms such as rgb() and CSS names are also accepted as input.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
Line 1: "#12345" has 5 hex digits; a hex color needs 3, 4, 6 or 8 | A hex color needs 3, 4, 6 or 8 digits, and this one has 5. | Add or remove a digit. |
Questions people ask
How do I convert hex to HSV?
Paste the hex code and press Hex to HSV. The tool converts the red, green and blue pairs to hue, saturation and value. For #ff8800 the answer is hsv(32, 100%, 100%).
Is HSV the same as HSB?
Yes. HSV is hue, saturation, value and HSB is hue, saturation, brightness. They describe the same model. Choose the hsb() style under HSV style if you want the other name.
Can I use hsv() in CSS?
No. CSS has hsl() but no hsv(). Browsers ignore an hsv() value, so use hex, rgb() or hsl() in a stylesheet. HSV is for design tools and code that asks for it.
Why does the result not convert back to the same hex?
The HSV numbers are rounded, whole by default, so some detail is lost. Choose 2 decimals for a closer round trip. Even then, rounding at each step can move a channel by 1.
Does it accept 3-digit and 8-digit hex?
Yes. #f80 is read as #ff8800, and an 8-digit code such as #00000080 includes alpha, which is kept as a fourth value in the result. The # sign is optional.
About this tool
Reads 3, 4, 6 or 8 digit hex (the # is optional) and writes the hue in degrees and saturation and value (brightness) in percent. HSV and HSB are the same model. Other color forms such as rgb() and CSS names are also read. HSV to hex takes hsv() or hsb() or a plain list like 32 100 100. HSV is not a CSS color function, so browsers do not read hsv(); use hex or rgb() in a stylesheet. The conversion goes through 8-bit RGB, so rounding can keep a round trip from landing on the exact starting value. A color with transparency keeps its alpha as a fourth value.