HEX to RGBA Converter

This is a HEX to RGBA converter. Paste a HEX code and get rgb() / rgba() with alpha as 0–1, 0–255 or a percent. #FF573380 is rgba(255, 87, 51, 0.5).

Examples — click a swatch

Click a value to copy it

Convert several colors at once. One per line, or commas such as #3B82F6, #FF573380. Fill example loads three rows and the table below.

HEX to RGBA

This is a HEX to RGBA converter: it turns a design HEX into CSS rgb() and rgba(). It accepts 3-digit #F53, 6-digit #FF5733 and 8-digit #FF573380. #FF573380 is rgba(255, 87, 51, 0.5). HEX to RGB nearby has no alpha; HSL and contrast stay on Color Converter.

How to use

  1. Paste HEX, HEX8, rgb(), rgba() or a comma list such as 255, 87, 51. Short #F53 expands to #FF5533.
  2. Drag the R, G, B or A sliders, or type in the number boxes. Alpha can be 0–1, 0–255 or a percent.
  3. Click a channel chip to copy just that value. Copy next to rgb() / rgba() / the CSS variable copies that line. Copy result copies rgba().
  4. Show example loads #FF573380. The swatches under Examples fill #FF5733, #F53, #FF573380, #3B82F6, #00000080 and fully transparent white.
  5. Pick from screen uses the browser EyeDropper where the browser allows it. Batch accepts one color per line or commas. Clear all empties the boxes.

Notes

8-digit HEX stores alpha in the last two digits: 80 hex is 128, 128/255 ≈ 0.502, not a clean 0.5. When alpha is 1, the CSS variable uses 6-digit HEX; otherwise HEX8. Modern CSS rgba(255 87 51 / 50%) is accepted. Chinese fullwidth commas such as 255,87,51 are accepted. Invalid HEX shows an error instead of crashing. Related: HEX to RGB, opacity overlay, Color Converter.

Where to use it

  • Turning a Figma HEX into rgba() for a CSS overlay.
  • Checking what a short #RGB expands to.
  • Copying one channel, or a --color variable, into a stylesheet.

Questions

Does short #F53 work?

Yes. Each digit is doubled: #F53 becomes #FF5533, then rgb(255, 85, 51).

Why is HEX 80 not alpha 0.5?

0x80 is 128. 128 ÷ 255 ≈ 0.502. Switch alpha to 0–255 or % if you think in bytes or percents.

Is this HEX-to-decimal?

No. Color HEX is three or four channels. Arbitrary integers stay on HEX to decimal.