RGB to Hex Color Converter



Convert any RGB value to its matching Hex color code, as well as any associated HSL values (with HTML/CSS values).



Enter red, green and blue color levels (0-255) and press the Convert button:

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

Get Custom SEO Recommendations for Your Copy

What is the use of this RGB to Hex Color converter?
You can enter input in the form of Red, Green, and Blue values ranging between 0 to 255 to convert them to a hex string or alternatively, HSL (Hue, Saturation, Luminance) value that could be used to indicate color in html/css code. Because editing softwares often express color in RGB, if you want to use the colors you use in your image editing program as the background of your html, you must find the hexadecimal equivalent of the RGB values. You can generate these values using this tool.

How to Convert RGB color to Hexadecimal
 

The color RGB

A RGB color scheme is made up of three colors: red, green, and blue (R, G, B).

Red, green, and blue require 8 bits each, with integer values that range from 0 to 255.

As a result, the total number of colors that can be obtained is:

256×256×256 = 16777216 = 100000016

The Hexadecimal color code


Hexadecimal color code is a six-digit (base-16) hexadecimal number:

RRGGBB16
  • The red shade is represented by the two left numbers.
  • The green shade is represented by the two middle numbers.
  • The blue shade is represented by the two right numbers.

RGB to hex color conversion:


Convert the decimal values of red, green, and blue to hexadecimal numbers.
Concatenate the red, green, and blue hex values together: RRGGBB.


Case #1
Convert the Blue color (0,0,255) to hex code:

R = 010 = 0016

G = 010 = 0016

B = 25510 = FF16

As a result, the hex color code is:

Hex = #0000FF

 

RGB to Hexadecimal values color table
Color (R,G,B) Values Hexadecimal Values
Black (0,0,0) #000000
White (255,255,255) #FFFFFF
Red (255,0,0) #FF0000
Lime (0,255,0) #00FF00
Blue (0,0,255) #0000FF
Yellow (255,255,0) #FFFF00
Cyan (0,255,255) #00FFFF
Magenta (255,0,255) #FF00FF
Silver (192,192,192) #C0C0C0
Gray (128,128,128) #808080
Maroon (128,0,0) #800000
Olive (128,128,0) #808000
Green (0,128,0) #008000
Purple (128,0,128) #800080
Teal (0,128,128) #008080
Navy (0,0,128) #000080


LATEST BLOGS


CONTACT US

ADDRESS

You may like
our most popular tools & apps