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
#------
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 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 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.
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.
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.
Hue is circular, so the tool wraps it rather than rejecting it. 390° becomes 30°, and -30° becomes 330°.
The result is gray and hue no longer affects the output.
The result is black regardless of hue or saturation.
Decimals are accepted for all three inputs. RGB channels are rounded only at the final 8-bit conversion step.
These are rejected explicitly instead of being silently clamped to a different color.
Related Tools
Convert HEX color codes into RGB color values.
Convert number base values.
Convert Base64 encoded data into hexadecimal values.
Convert hexadecimal values into Base64 encoded data.
Convert binary values into hexadecimal numbers.
Convert hexadecimal values into binary numbers.