Color & Design

How to Convert RGB Color to HEX

Turn RGB or RGBA color values into HEX codes for CSS, design tools, and brand guidelines.

Tool Used

RGB to HEX

Open tool
1

Open the RGB to HEX tool

Navigate to /tools/color/rgb-to-hex.

2

Enter the RGB values

Type the red, green, and blue values into their respective input boxes. Each value is a number from 0 to 255. You can also paste a full rgb() or rgba() string and the tool will parse out the values automatically.

3

Read the HEX output

The corresponding HEX color appears instantly below the inputs. It starts with a hash symbol and has six characters in standard form (eight if you include alpha).

4

Add an alpha channel if needed

If you need transparency, use the alpha input or slider. The output becomes an eight digit HEX value where the last two characters represent the alpha channel from 00 (fully transparent) to FF (fully opaque).

5

Copy and use

Click Copy to grab the HEX value. Paste it into your CSS, your design tool, your brand guidelines document, or wherever a HEX color is expected.

All done!

You are ready to use RGB to HEX like a pro.

Try it now
All guides