Blog
Unit converters

HEX to HSV converter

Enter a HEX color code (e.g. #3B82F6), and the converter computes it in the HSV model: hue (H) in degrees from 0 to 360, saturation (S) and value (V) in percent.

Result

Hue (H) —
Saturation (S) —
Value (V) —
HSV string —

All calculations run locally in your browser: parsing, chart, export. Disconnect the network and the page keeps working.

Facts and limits of this method

Supported formats 3-digit (#RGB) and 6-digit (#RRGGBB) HEX
Intermediate step HEX is first converted to RGB, then to HSV
Hue range 0° to 360°
Saturation and value range 0% to 100%

When it misleads you

How it is calculated

The HEX code is parsed into three channels — red, green and blue, each from 0 to 255 (a shorthand 3-digit code is first expanded to 6 digits).

R, G, B values are normalized by dividing by 255, giving numbers from 0 to 1.

Value (V) is the maximum of the normalized R, G, B; saturation (S) is the ratio of the difference between max and min to max.

Hue (H) is computed based on which channel is the maximum, using a piecewise formula that gives a value from 0° to 360°.

Questions and answers

How is HSV different from HSL?

Hue is defined the same way in both models, but saturation and lightness/value use different formulas, so identical percentages in HSL and HSV produce different colors.

Can I enter HEX without the # symbol?

Yes, the # is optional — the converter understands the code with or without it.

Does shorthand 3-digit HEX work?

Yes, the converter automatically expands it to the full 6-digit form before calculating.

Is my data sent anywhere?

No, the whole calculation runs in your browser.

Related tools

All tools