Color Conversion Tools
HEX to HSV
Find the hue, saturation and value behind a HEX code. Useful for building lighter or darker variants of a brand color, matching a hue across a palette, or reading what a color picker's sliders are set to.
Edit a channel and see the color result immediately.
Enter HEX
Enter #RGB or #RRGGBB. These pair converters use opaque colors.
HSV result
The conversion runs in your browser.
All formats
- HEX
#336699- RGB
rgb(51, 102, 153)- HSL
hsl(210, 50%, 40%)- HSV
hsv(210°, 66.7%, 60%)- CMYK
cmyk(66.7%, 33.3%, 0%, 40%)- OKLCH
oklch(49.9% 0.099 250.4)- CSS
≈ steelblue
Tints and shades
Text contrast (WCAG)
Normal text needs 4.5:1 for AA and 7:1 for AAA; large text needs 3:1.
How it was calculated
R = 33₁₆ = 3 × 16 + 3 = 51G = 66₁₆ = 6 × 16 + 6 = 102B = 99₁₆ = 9 × 16 + 9 = 153R′ = 51 ÷ 255 = 0.2, G′ = 0.4, B′ = 0.6max = 0.6, min = 0.2, Δ = 0.4H = 60 × ((R′ − G′) ÷ Δ + 4) = 210°S = Δ ÷ max = 66.7%, V = max = 60%
Common colors in HEX and HSV
Choose a color to load it into the converter.
| Color | HEX | HSV |
|---|---|---|
#000000 | hsv(0°, 0%, 0%) | |
#ffffff | hsv(0°, 0%, 100%) | |
#ff0000 | hsv(0°, 100%, 100%) | |
#00ff00 | hsv(120°, 100%, 100%) | |
#0000ff | hsv(240°, 100%, 100%) | |
#ffff00 | hsv(60°, 100%, 100%) | |
#00ffff | hsv(180°, 100%, 100%) | |
#ff00ff | hsv(300°, 100%, 100%) | |
#808080 | hsv(0°, 0%, 50.2%) | |
#800000 | hsv(0°, 100%, 50.2%) | |
#008000 | hsv(120°, 100%, 50.2%) | |
#000080 | hsv(240°, 100%, 50.2%) | |
#ffa500 | hsv(38.8°, 100%, 100%) | |
#4682b4 | hsv(207.3°, 61.1%, 70.6%) | |
#663399 | hsv(270°, 66.7%, 60%) | |
#ff6347 | hsv(9.1°, 72.2%, 100%) |
How to use
- Enter a HEX code such as #2e8b57, or choose one with the picker.
- Read hue in degrees and saturation and value as percentages; the calculation panel shows max, min and the hue sector.
- Change only the value or saturation in your design tool to make related colors, or use the tints and shades strip here.
Examples
Sea green
Green is the largest channel, so the hue lands between green (120°) and cyan (180°). The darkest and brightest channels set saturation and value.
#2e8b57
hsv(146.5°, 66.9%, 54.5%)
Why look at a HEX color as HSV
A HEX code tells a computer the color; HSV tells a person how it behaves. Splitting #2e8b57 into hue, saturation and value answers practical questions:
- Is this the same hue as our accent? Compare hue angles. Two greens at 146° and 150° read as one family; at 146° and 170° they don’t.
- How do I make a hover state? Lower the value by 8–12 points and keep hue and saturation. The shade strip next to the converter previews that kind of change.
- Why does this color look muddy? Low saturation with a mid value usually explains a dull color better than any channel number.
- What do I type into a picker? Photoshop, Procreate and many web pickers show H, S and B sliders, which are the same values.
How the conversion works
First the HEX code becomes channels between 0 and 1: #2e8b57 gives R′ = 0.180, G′ = 0.545 and B′ = 0.341.
- Value is the largest channel: 0.545, or 54.5%.
- Saturation is the spread divided by that maximum: (0.545 − 0.180) ÷ 0.545 = 66.9%.
- Hue depends on which channel is largest. Here green leads, so H = 60 × ((B′ − R′) ÷ Δ + 2), which is 146.5°.
The calculation panel shows the same steps, including which formula applies, for any code you enter.
Reading the numbers
Hue runs around the wheel: 0° red, 60° yellow, 120° green, 180° cyan, 240° blue and 300° magenta. Saturation 0% is gray; 100% has no gray mixed in. Value 0% is always black whatever the hue.
For the reverse direction use HSV to HEX. If you work in CSS, the All formats panel also shows the HSL form of the same color.
Frequently asked questions
What is the difference between HSV and HSL?
Both share the same hue. HSV's value is the brightest channel, so a fully saturated color is at 100% value. HSL's lightness puts pure colors at 50%. Design tools such as Photoshop and many color pickers use HSV (also called HSB).
Why is the hue a decimal?
Hue is calculated from channel differences and rarely lands on a whole degree. The converter keeps one decimal so you can round as your tool requires.
Can I use hsv() in CSS?
No. CSS has hsl(), hwb(), lab() and oklch(), but no hsv(). Use HSV to reason about the color, then copy HEX, RGB or HSL from the All formats panel for your stylesheet.
Why does a gray have a hue of 0°?
When red, green and blue are equal there is no dominant direction on the color wheel, so hue is undefined and shown as 0° with 0% saturation.
Does the result change if I convert back?
Possibly by one step in a channel, because HSV percentages are rounded to one decimal. Keep the original HEX code as your source of truth.