hexcolors

Tools / RGB to HEX converter

RGB to HEX converter

Paste a RGB value and get the HEX result right away, plus every other format.

How RGB converts to HEX

Convert each of the red, green and blue numbers to a two-digit base 16 value and join them after a hash sign. For rgb(30, 144, 255), 30 is 1E, 144 is 90 and 255 is FF, which gives #1E90FF.

Common colors in RGB and HEX

ColorRGBHEX
redrgb(255, 0, 0)#FF0000
orangergb(255, 165, 0)#FFA500
goldrgb(255, 215, 0)#FFD700
limergb(0, 255, 0)#00FF00
tealrgb(0, 128, 128)#008080
navyrgb(0, 0, 128)#000080
indigorgb(75, 0, 130)#4B0082
purplergb(128, 0, 128)#800080
hotpinkrgb(255, 105, 180)#FF69B4
coralrgb(255, 127, 80)#FF7F50
chocolatergb(210, 105, 30)#D2691E
grayrgb(128, 128, 128)#808080
silverrgb(192, 192, 192)#C0C0C0
blackrgb(0, 0, 0)#000000

How to use it

Three quick steps.

  1. Type or paste a RGB value.
  2. Read the HEX result instantly.
  3. Click any value to copy it.

Good to know

Get better results.

  • You can also paste a hex code, rgb(), hsl() or a color name. The tool understands them all.
  • Every other format is shown too, so one lookup covers all your needs.
  • Values are rounded to whole numbers where it makes sense.

Common questions

How do I convert RGB to HEX?

Convert each of the red, green and blue numbers to a two-digit base 16 value and join them after a hash sign. For rgb(30, 144, 255), 30 is 1E, 144 is 90 and 255 is FF, which gives #1E90FF.

Is this RGB to HEX converter free?

Yes. It is free, private and runs in your browser, so your colors are never uploaded.

Can I convert from other formats too?

Yes. Enter a hex code, rgb(), hsl() or a CSS color name and you still get every format.

More tools

Keep going with a related tool.