HSV to HEX Converter

Convert HSV or HSB values into the HEX codes developers expect in a handoff.

Colour
HEX codes
Runs locally in your browser

About the HSV to HEX Converter

Picking a colour is a job for HSV sliders, but handing it over is a job for HEX. Every design file, ticket and stylesheet ends up carrying six hexadecimal digits, so the last step of choosing a colour is usually this conversion. Enter values as hsv(148, 84%, 76%), as hsb 148 84 76, or as a bare triple with commas or spaces, and each line comes back as an uppercase HEX code.

Expect a small amount of snapping. HEX stores 256 levels per channel, whereas the saturation and value sliders you dragged were continuous, so two HSV triples a fraction of a percent apart can land on identical codes. That is normal and invisible on screen. Hue is taken modulo 360 as well, so 370 degrees is read as 10 degrees rather than rejected.

Saturation and value must sit between 0 and 100; anything outside that range is refused rather than silently clamped, which keeps a mistyped 840 from quietly becoming pure colour. Use HSV to RGB when the target is a canvas or an API instead of markup, and HEX to HSV to read an existing code back into slider values.

How to use

  1. Type or paste HSV values, one colour per line.
  2. The hsv() and hsb() wrappers are optional, as are the percent signs.
  3. Press Convert and copy the HEX codes.

Common questions

Will HSB values from Photoshop work here?
Yes, HSB and HSV are the same model, so paste the three numbers straight from the picker.
Are the percent signs required?
No, saturation and value are read as percentages whether or not you type the symbol.
Why did two different inputs give the same code?
HEX has 256 steps per channel, so very close HSV values round to one code.
What if the hue is above 360?
It wraps around the colour wheel, so 400 degrees is treated as 40 degrees.