RGB to HSV (HSB) Converter
Convert RGB, HEX or CMYK to HSV/HSB (hue, saturation, value) and HSV back to RGB and HEX, with OpenCV's 0–179 / 0–255 scaling for image processing.
Converting for CSS? HEX to HSL converter →
HSV — also called HSB (hue, saturation, brightness) — is the model behind most color pickers, including Photoshop, Figma and Procreate: pick a hue on the wheel, then move inside a square where right means more saturated and up means brighter. This converter turns RGB, HEX or CMYK into HSV and back, and also gives the 8-bit values OpenCV uses (hue 0–179, saturation and value 0–255), which is handy for color thresholding in image-processing code.
How to use this tool
- Choose RGB/HEX → HSV, CMYK → HSV or HSV → RGB/HEX.
- Enter the color: a HEX code or rgb(), four CMYK percentages, or hue, saturation and value.
- Read the HSV values, the OpenCV scaling or the HEX/RGB result.
- Use the swatch to see where the color sits in the saturation/value square.
Formula
V = max(R′, G′, B′) · S = (max − min) ÷ max · H = 60° × sector formula (as in HSL)
R′, G′, B′ are channels ÷ 255. Back from HSV: with i = ⌊H ÷ 60⌋ and f the fraction, p = V(1 − S), q = V(1 − S·f), t = V(1 − S(1 − f)); each sector picks a different order of V, t, p, q. OpenCV halves the hue so it fits in a byte and works in fixed-point integers, which this page reproduces exactly.
Example
#FF6347 has max 1 and min 0.2784, so V = 100%, S = (1 − 0.2784) ÷ 1 = 72.2% and H = 9.1° — hsv(9.1, 72.2%, 100%). In OpenCV that is H 5, S 184, V 255. Going back, HSV(210°, 66.7%, 60%) gives V = 153, p = 51, q = 102 and the sector (p, q, V) = rgb(51, 102, 153) = #336699.
Frequently asked questions
Is HSB the same as HSV?
Yes — two names for the same model. Adobe and Apple say HSB (brightness), most programming libraries say HSV (value).
Why is hue 0–179 in OpenCV?
An 8-bit channel holds only 0–255, so OpenCV stores hue divided by 2 (0–179). Saturation and value are scaled from 0–1 to 0–255. Remember to halve hue angles when you set thresholds in cv2.inRange().
How is HSV different from HSL?
In HSV, value 100% with saturation 100% is the pure color; in HSL the pure color sits at lightness 50%, and lightness 100% is always white. Saturation therefore means different things in the two models.
Sources
Last updated:
Page address with these inputs: https://kakao.mobile/tools/rgb-to-hsv-tool/
Cite or embed this tool
kakaoCalc. (2026, November 8). RGB to HSV (HSB) Converter. https://kakao.mobile/tools/rgb-to-hsv-tool/
“RGB to HSV (HSB) Converter.” kakaoCalc, 8 Nov. 2026, kakao.mobile/tools/rgb-to-hsv-tool/.
Paste this code into your page. The widget runs in your visitors' browsers, shows no ads and keeps a link back to this page. Embedding terms