HSV to Hex Converter

Turn hue, saturation, and value coordinates into a six-digit CSS HEX color, with a reverse HEX-to-HSV mode for checking or recovering the HSV values.

Last updated: August 2026 | By Workshelve Team

HEX Result
#------

What HSV Inputs Mean

Hue: a circular angle

Hue is measured around a color wheel. 0° and 360° point to the same red hue. Negative or larger angles are wrapped into the 0°–360° cycle, so -30° becomes 330°.

Saturation: colorfulness from gray

Saturation must be between 0% and 100%. At 0%, hue has no visible effect because the result is gray. At 100%, the HSV color uses maximum saturation for its value level.

Value: the top RGB channel

Value must be between 0% and 100%. A value of 0% produces black regardless of hue or saturation; 100% allows at least one resulting RGB channel to reach full intensity.

How HSV Becomes a HEX Color

HSV is first converted into RGB. Saturation and value are changed from percentages to fractions, and hue determines which 60° sector of the color wheel supplies the strongest red, green, and blue components.

The calculated RGB fractions are shifted by the minimum channel value, scaled to 0–255, and rounded to 8-bit channel integers. Those three integers are then written as two hexadecimal digits each to form #RRGGBB.

Worked example
HSV(45°, 100%, 100%)
→ RGB(255, 191, 0)
→ #FFBF00

Using the HEX Result in CSS

The output is a six-digit CSS hexadecimal RGB color in #RRGGBB form. For example, HSV(300°, 25%, 80%) converts to #CC99CC.

CSS hexadecimal notation represents sRGB channel values. HSV is not itself part of CSS hexadecimal syntax; this converter uses HSV as an editing coordinate system and then converts the result into sRGB RGB channels for the HEX string.

A round trip is not always numerically identical in HSV because the HEX result contains only 8-bit RGB channels. Converting fractional HSV coordinates to RGB requires rounding those channels to integers.

Practical HSV to HEX Examples

HSV(0°, 100%, 100%)
#FF0000
HSV(45°, 100%, 100%)
#FFBF00
HSV(210°, 50%, 60%)
#4D7399
HSV(300°, 25%, 80%)
#CC99CC
HSV(-30°, 100%, 100%)
#FF0080
HSV(0°, 0%, 50%)
#808080

HSV to HEX: Important Edge Cases

Hue outside 0°–360°

Hue is circular, so the tool wraps it rather than rejecting it. 390° becomes 30°, and -30° becomes 330°.

Saturation at 0%

The result is gray and hue no longer affects the output.

Value at 0%

The result is black regardless of hue or saturation.

Decimal HSV values

Decimals are accepted for all three inputs. RGB channels are rounded only at the final 8-bit conversion step.

S or V outside 0%–100%

These are rejected explicitly instead of being silently clamped to a different color.

Related Tools