HSV to hex
HSV and HSB are the same model under two names. It is what most colour picker squares actually manipulate.
#4287f5Paste a HSV value — other formats work too.
Need every format at once? Open in the full picker
Worked examples
Common colours converted from HSV to hex, computed with the same engine the picker uses.
| Colour | HSV | hex | Copy |
|---|---|---|---|
| Pure red | hsv(0, 100%, 100%) | #ff0000 | |
| Pure green | hsv(120, 100%, 100%) | #00ff00 | |
| Pure blue | hsv(240, 100%, 100%) | #0000ff | |
| White | hsv(300, 0%, 100%) | #ffffff | |
| Mid grey | hsv(300, 0%, 50.2%) | #808080 | |
| Black | hsv(0, 0%, 0%) | #000000 | |
| Interface blue | hsv(216.9, 73.1%, 96.1%) | #4287f5 | |
| Success green | hsv(142.1, 82.7%, 77.3%) | #22c55e | |
| Danger red | hsv(0, 71.5%, 93.7%) | #ef4444 | |
| Warning amber | hsv(37.7, 95.5%, 96.1%) | #f59e0b | |
| Editor black | hsv(0, 0%, 11.8%) | #1e1e1e | |
| Warm sand | hsv(42.5, 54.5%, 91.4%) | #e9c46a |
How the conversion works
HSV and HSB are the same model under two names. It is what most colour picker squares actually manipulate.
Both formats are computed from a single canonical representation — CIE XYZ with a D65 white point, held in floating point — rather than by chaining one format into the next. That matters because chained conversions accumulate rounding error, and because it means a colour that cannot be represented in the target format is handled deliberately rather than by accident.
When the source describes a colour outside the target's gamut, chroma is reduced in OKLCh while lightness and hue are held, following the CSS Color 4 gamut mapping algorithm. Clipping each channel independently would be simpler but visibly shifts hue on saturated colours.