HSV to RGB Conversion



HSV to RGB Converter

Enter hue (H): °
Enter saturation (S): %
Enter value (V): %
   
RGB hex code (#):  
Red color (R):  
Green color (G):  
Blue color (B):  
Color preview:  


HSV to RGB Conversion

It is a color code conversion calculator that is used to convert the hue in degrees (˚), saturation and value (HSV) to red, green and blue colors (RGB). The saturation and value are often expressed as percentages based on a scale of 0 to 100%. To use the calculator, enter the hue, saturation, and value in their blank text fields respectively. Click on the ‘Convert' button to initiate the conversion.

This displays the RGB hex code, red, green and blue colors at the result panel below the two controls. The ‘Reset' button is used when you have new values in HSV that needs to be converted to RGB. It is the fastest way of readjusting the calculator. The color preview of the red, green and blue colors will be highlighted at the bottom platform of the converter.

For example

Convert 30 degrees Hue, 25% saturation and 60% lightness to RGB.

Solution

First, enter the HSL values 60, 40 and 70 in their blank text fields respectively. Click the ‘Convert' button to initiate the conversion. The result will be displayed as;

RGB hex code# - 998673

Red color (R) – 153

Green color (G) – 134

Blue Color (B) – 115

The color preview of the above RGB values will be shown in the bottom panel of the calculator.

Formula used in converting HSV to RGB

When 0 ≤ H < 360 (0 is less than or equal to Hue and less than 360), 0 ≤ S ≤ 1 (0 is less than or equal to saturation which is less than or equal to 1) and 0 ≤ V ≤ 1 (0 is less than or equal to value and less than or equal to 1);

C = V × S

X = C × (1 - | (H / 60°) mod 2 - 1|)

m = V - C

(R, G, B) = ((R'+ m) ×255, (G'+ m) ×255, (B'+ m) ×255)