RGB to HEX

Convert red, green, and blue values into a hex color code, with a live swatch and an optional alpha channel. Everything runs in your browser.

HEX#3b82f6
HEX + alpha#3b82f6ff
CSSrgb(59, 130, 246)

About RGB to HEX

RGB describes a color with separate red, green, and blue channels from 0 to 255. Hex packs those same three channels into a short code that starts with a hash, which is the format most CSS and design tools expect.

Enter your RGB values and this tool shows the matching hex code, a hex code with an alpha channel, and a ready to use CSS string, along with a swatch so you can confirm the color.

How to Use

  1. Enter the red, green, and blue values from 0 to 255.
  2. Adjust alpha if you need transparency.
  3. Read the hex code and copy it with one click.
  4. Use the HEX to RGB tool to convert the other way.

Frequently Asked Questions

What range do the RGB values use?

Each of red, green, and blue runs from 0 to 255. Values outside that range are clamped so the result stays valid.

Can I include transparency?

Yes. Set the alpha from 0 to 1 and the tool shows an 8 digit hex code that includes the alpha channel.

Is the tool private?

Yes. The conversion happens in your browser and nothing is uploaded.

About Matt George

I'm Matt George, a software engineer in the startup space. I run my own shop building software for early-stage founders, and I love making free tools and experiences that people actually use. Enjoy using RGB to HEX!

More Free Tools