Decode an RGB HEX color into hue, saturation, and value, or switch directions to rebuild a six-digit CSS HEX color from HSV coordinates.
Last updated: August 2026 | By Workshelve Team
HSV values will appear here...
A six-digit CSS HEX color stores red, green, and blue as three 8-bit hexadecimal channel values.
Hue represents a direction around the color wheel, saturation measures distance from gray, and value tracks the strongest RGB channel.
When red, green, and blue are equal, saturation is zero. This tool reports hue as 0° by convention because hue does not affect an achromatic color.
The first step is decoding HEX into red, green, and blue channel values from 0 to 255. For example, #336699 becomes RGB(51, 102, 153). Those channels are then normalized to values from 0 to 1.
HSV uses the largest and smallest normalized RGB channels. Value is the largest channel. Saturation is the difference between the largest and smallest channels divided by the largest channel, except black, where saturation is defined as zero.
Hue depends on which RGB channel is largest and how the other two channels differ. The result is expressed as an angle around a 360° color wheel. For #336699, the result is H 210°, S 66.666667%, V 60%.
* Hue is shown as 0° by convention when saturation is 0%; changing hue would not change that gray.
Yes, after shorthand expansion. For example, #369 expands to #336699 before the RGB-to-HSV calculation.
Those colors have zero saturation, so hue does not affect the visible result. This converter returns 0° as a stable convention for achromatic colors.
HSV is calculated from ratios between RGB channels. Those ratios often produce fractional hue, saturation, or value even when the source RGB channels are whole numbers.
No. This page converts between two ways of describing a color. The HEX output uses CSS hexadecimal RGB notation; HSV is a separate coordinate representation. The accepted 0x prefix is an input convenience, not CSS color syntax.
The mathematical conversion describes the same RGB color in HSV coordinates. Small differences can appear after a round trip if HSV values are rounded before converting back.
In this conversion model, value is the largest normalized RGB channel expressed as a percentage. A value of 0% is black; 100% means at least one RGB channel is at full intensity.
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.