Search for a tool
HSV Channels

Tool to separate 3 properties of colors in an image: the hue H, the saturation S and value V (brightness) also called (HSV channels).

Results

HSV Channels -

Tag(s) : Image Processing

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'HSV Channels' tool for free! Thank you!

HSV Channels

Hue/Saturation/Value Channels Separation

  [X]






Answers to Questions (FAQ)

What are HSV channels of an image? (Definition)

The HSV (or HSL) color space is a color representation model based on a (human) perception of color.

The hue is commonly called color (mainly red, yellow, green, cyan, blue or magenta). It is common to represent the hue in a circle and give the value of the hue in degrees (over 360 degrees).

Example: 0° or 360° for red, 60° : yellow, 120° : green, 180° : cyan, 240° : blue, 300° : magenta.

Saturation refers to the intensity of the color between gray (low saturation or desaturation) and pure color (high saturation). The saturation is usually expressed as a percentage or between 0 and 1.

The value corresponds to the brightness of the color, between black (low value) and average saturation (maximum value). The value is usually expressed as a percentage or between 0 and 1.

How to calculate HSV values of an image?

From RGB values (Red, Green, Blue) expressed between 0 and 1.

The brightness $ V $ is expressed between 0 and 1 and is calculated $$ V = \operatorname{max}(R, G, B) $$

Then calculate the intermediate value $ C = V - \operatorname{min}(R, G, B) $

The hue H is expressed in degrees (between 0 and 360) using the formula:

$$ H = 60 ^\circ \times \begin{cases} \text{undefined} & \text{if } C = 0 \\ \left( \frac{G - B}{C} \right) \pmod 6 & \text{if } V = R \\ \left( \frac{B - R}{C} + 2 \right) \pmod 6 & \text{if } V = G \\ \left( \frac{R - G}{C} + 4 \right) \pmod 6 & \text{if } V = B \end{cases} $$

The saturation S is expressed between 0 and 1: $$ S = \begin{cases} 0 & \text{if } V = 0 \\ \frac{C}{V}, & \text{otherwise} \end{cases} $$

How to separate HSV channels of an image?

For each pixel in an image, calculate the value of T (hue), S (saturation), and L (brightness) and form three grayscale images with them.

dCode performs this separation automatically from an image file.

Why using HSV rather than RGB?

The main advantage of TSL over RGB is that the luminosity (the intensity of the image / luma), the hue and the saturation (the information on the color / chroma) are separated.

Example: To identify the basic color of a pixel, look at its hue (which is the only correct term for red, yellow, etc.)

Source code

dCode retains ownership of the "HSV Channels" source code. Any algorithm for the "HSV Channels" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "HSV Channels" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "HSV Channels" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.

Cite dCode

The content of the page "HSV Channels" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source. Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link: https://www.dcode.fr/hsv-channels
In a scientific article or book, the recommended bibliographic citation is: HSV Channels on dCode.fr [online website], retrieved on 2025-04-16, https://www.dcode.fr/hsv-channels

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'HSV Channels' tool for free! Thank you!


https://www.dcode.fr/hsv-channels
© 2025 dCode — The ultimate collection of tools for games, math, and puzzles.
 
Feedback