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
| Color | RGB | HEX |
|---|---|---|
| red | rgb(255, 0, 0) | #FF0000 |
| orange | rgb(255, 165, 0) | #FFA500 |
| gold | rgb(255, 215, 0) | #FFD700 |
| lime | rgb(0, 255, 0) | #00FF00 |
| teal | rgb(0, 128, 128) | #008080 |
| navy | rgb(0, 0, 128) | #000080 |
| indigo | rgb(75, 0, 130) | #4B0082 |
| purple | rgb(128, 0, 128) | #800080 |
| hotpink | rgb(255, 105, 180) | #FF69B4 |
| coral | rgb(255, 127, 80) | #FF7F50 |
| chocolate | rgb(210, 105, 30) | #D2691E |
| gray | rgb(128, 128, 128) | #808080 |
| silver | rgb(192, 192, 192) | #C0C0C0 |
| black | rgb(0, 0, 0) | #000000 |
How to use it
Three quick steps.
- Type or paste a RGB value.
- Read the HEX result instantly.
- 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.