код RGB to hex Conversion - Calculatorology

# RGB to hex Conversion

### RGB to Hex Color Conversion

 Red color (R): Green color (G): Blue color (B): Color preview: Hex color code: RGB color code: HSL color code:

### RGB to Hex Conversion

It is a color conversion calculator used to convert red, green and blue color codes (RGB) into the Hex color codes. It has three text fields and one for color preview. The color codes for the RGB values range from 0 to 255. If you want to use the RGB to Hex converter, enter the color codes for red, green and blue respectively and then click the ‘Convert' button. This gives you the Hex color code, HSL color code, and the RGB color code. The ‘Reset' button is used when you have new RGB values. It erases all data of the previous conversions from the calculator to give a new space for a new conversion.

##### For example;

Determine the Hex color code given that the red, green and blue color codes are 116, 93 and 48 respectively.

##### Solution

First, enter the RGB values (116, 93 and 48) in their appropriate text fields. Initiate the conversion by clicking the ‘Convert' button. The results will be displayed as;

Hex color code: #745D30

RGB color code: RGB (116, 93, 48)

HSL color code: HSL (40, 41, 32)

The RGB to Hex color table also gives the conversions of common color codes into Hex code. The RGB to Hex can only perform one calculation at a time. You can always repeat the same procedure with new values of red, green and blue color codes.

#### Formula for converting RGB to Hex

The first step is to convert the red, green and blue color codes from decimals to hex color code. The 3 hex values of the red, green and blue have to be concentrated together; RRGGBB.

Example #2

Convert gold color (255, 215, 0) to hex color code:

R = 25510 = FF16

G = 21510 = D716

B = 010 = 0016

Therefore, the hex color code is:

Hex = FFD700