How to convert RGB to HEX?
Enter a value in RGB and the converter will instantly calculate the equivalent in HEX. All conversions are done locally in your browser for maximum speed and privacy.
Common RGB to HEX conversions
| RGB | HEX |
|---|---|
| rgb(255, 0, 0) | #ff0000 |
| rgb(255, 140, 0) | #ff8c00 |
| rgb(255, 215, 0) | #ffd700 |
| rgb(0, 128, 0) | #008000 |
| rgb(0, 0, 255) | #0000ff |
| rgb(128, 0, 128) | #800080 |
What is the difference between RGB and HEX?
RGB defines colors with red, green and blue values from 0 to 255. It is the native color model for screens and web. HEX codes represent colors as six hexadecimal digits. They are the most compact color format for CSS and HTML.