HEX to HSV / HSB converter
Enter a HEX value such as #8338EC to convert it to HSV / HSB. Every other format is shown too, and the result updates as you type.
Detected HEX.
Examples: #1e90ff, rgb(30 144 255 / 50%), hsl(210 100% 56%), oklch(0.65 0.18 255), cmyk(88% 44% 0% 0%), tomato
- Name
- Deep vivid violet(descriptive)
- Alpha
- 100%
- Relative luminance
- 0.1371
- Perceived lightness (OKLCH L)
- 54.6%
- Contrast on white
- 5.61:1
- Contrast on black
- 3.74:1
Converted values
- HEX
#8338ec - RGB
rgb(131 56 236) - HSL
hsl(265 82.6% 57.3%) - HSV / HSB
hsv(265 76.3% 92.5%) - HWB
hwb(265 22% 7.5%) - OKLCH
oklch(54.58% 0.2478 295.88) - OKLAB
oklab(54.58% 0.1082 -0.223) - CIELAB
lab(42.72% 58.87 -79.21) - CMYK
cmyk(44% 76% 0% 7%)
CMYK is a naive, device-independent approximation. Real print colours depend on the ink, paper and ICC profile your printer uses, so ask your printer for a proofed conversion. HSV/HSB is not a CSS format and is shown for design apps. CIELAB uses the D50 white point, as in CSS lab().
How to convert HEX to HSV / HSB
- Convert HEX to RGB and divide by 255.
- Value (brightness) is the largest channel.
- Saturation is (max − min) ÷ max, or 0 for black.
- Hue is calculated exactly as for HSL, in degrees.
About HEX
A HEX code writes the red, green and blue channels of an sRGB colour as two hexadecimal digits each (00–FF), so #FF5733 means red 255, green 87, blue 51. An optional fourth pair adds transparency, and three-digit shorthand such as #F53 doubles each digit.
About HSV / HSB
HSV (also called HSB) uses hue, saturation and value (brightness). It is the model behind the square picker in Photoshop, Figma and most design apps. It is not a CSS format, so convert to HEX or RGB for code.