FREE WEB TOOL

RGB to HEX converter

Convert RGB values (0–255) into a #RRGGBB hexadecimal color code.

Use tool

🔒 Inputs are processed locally in your browser.

How to use it

Convert red, green and blue channel values (0–255) into the six-digit #RRGGBB form commonly used in CSS and design tools.

  1. Enter R, G and B from 0 to 255.
  2. Select Convert.
  3. Use the resulting six-digit code in CSS, design software or anywhere a HEX color is accepted.
Input
R / G / B: 0–255
Output
#RRGGBB
Example
49, 118, 236
Processing
In browser

From three decimal values to one color code

With R=49, G=118 and B=236, the converter turns the three decimal channels into a single #RRGGBB value. You do not need to convert each number to hexadecimal by hand.

HEX and RGB are two notations for the same color information; converting between them does not alter the color itself.

The six digits are three channel pairs

HEX colors are ordered as red, green and blue: RR, GG and BB. Each two-digit pair runs from 00 to FF, which maps directly to the decimal range 0–255.

00 is the minimum and FF is the maximum

For any channel, 00 means none of that component and FF means the maximum. That is why #000000 is black and #FFFFFF is white.

CSS accepts the result directly

The #RRGGBB form can be used in properties such as color, background-color and border-color. If you also need transparency, use an alpha-capable form such as eight-digit HEX or rgba().

Three-digit HEX is a shorthand, not a different model

Values such as #FFFFFF can be shortened to #FFF, and #336699 to #369, because each pair repeats the same digit. Keeping the six-digit result is clearer when you are checking or sharing an exact value.