RGBA to HEX
Convert your RGBA color format to HEX format.
About this tool
Type or paste an RGBA color, or choose one with the picker, and the converter shows it as HEX as you type, with a preview and every other format underneath, each with its own copy button. It reads colors written in any of the formats, and color names like “tomato”, too.
How to convert RGBA to HEX
RGBA already gives the red, green and blue channels, from 0 to 255, and alpha from 0 to 1. To write a HEX code, turn each channel into two base-16 digits and put them after a #: 168 is a8, 208 is d0 and 141 is 8d, which makes #a8d08d.
HEX has no alpha, so the opacity is dropped and the color comes out fully solid.
RGBA to HEX examples
| Color | RGBA | HEX |
|---|---|---|
| Sage green | rgba(168, 208, 141, 0.8) |
#a8d08d |
| Red | rgba(255, 0, 0, 0.8) |
#ff0000 |
| Tomato | rgba(255, 99, 71, 0.8) |
#ff6347 |
| Gold | rgba(255, 215, 0, 0.8) |
#ffd700 |
| Dodger blue | rgba(30, 144, 255, 0.8) |
#1e90ff |
| Indigo | rgba(75, 0, 130, 0.8) |
#4b0082 |
| Black | rgba(0, 0, 0, 0.8) |
#000000 |
| White | rgba(255, 255, 255, 0.8) |
#ffffff |
What is RGBA?
RGBA adds alpha, the opacity, to RGB as a number from 0 (invisible) to 1 (solid). In current CSS, rgb() takes an alpha too, but rgba() still works everywhere and is the more familiar of the two.
What is HEX?
A HEX code is the most common way to write a color for the web and in design apps: a # followed by three pairs of base-16 digits, from 00 to ff, for red, green and blue. A three-digit code like #fc0 is short for #ffcc00.