fast&private

Convert RGB Color to RGBA

Add transparency to an RGB color and copy the CSS-ready rgba().

Your data is never sent to any server.

RGBA → RGB RGB → RGBA

The RGB to RGBA converter adds transparency to an RGB color. Pick the opacity with a slider and copy the result in the format your CSS uses: rgba(), 8-digit hex or the modern rgb(r g b / %) syntax. If your color is in hexadecimal, use the hex to RGBA converter.

rgba() versus opacity

Both make something transparent, but they do not do the same thing:

rgba() coloropacity property
What becomes transparentOnly that property, such as the backgroundThe whole element
Text and childrenStay opaqueBecome transparent too
Typical useBackgrounds, borders, shadows and overlaysFades and disabled elements

For a card with a semi-transparent background and readable text, the right choice is background: rgba(...). With opacity: 0.5 the text would fade as well.

What it’s for

  • Overlays on images: a black background at 40% over a photo makes white text easy to read.
  • Interface states: soft versions of your brand color for alert backgrounds, selected rows or hover buttons.
  • Subtle shadows and borders: a low-opacity black adapts to any background better than a fixed gray.

How to use RGB to RGBA

  1. 1

    Enter the RGB color

    Type the R, G and B channels, each from 0 to 255. If you come from another color tool, the values are filled in for you.

  2. 2

    Pick the opacity

    Move the slider between 0% (invisible) and 100% (opaque). The color swatch updates instantly.

  3. 3

    Copy the format you use

    Copy the classic rgba(), the 8-digit hex or the modern rgb(r g b / %) syntax. All three give the same color.

Frequently asked questions

What is the difference between RGB and RGBA?

RGBA is RGB plus a fourth value, the alpha, which sets the opacity. It goes from 0 (transparent) to 1 (opaque). rgb(255, 0, 0) is a solid red and rgba(255, 0, 0, 0.5) is the same red at 50%.

Should I use rgba() or the opacity property?

It depends on what you want to make transparent. opacity affects the whole element, including its text and children. An rgba() background color only makes that background transparent, and the text stays fully readable.

Do I still need to write rgba()?

Not in current browsers. Today rgb() also accepts alpha with the rgb(255 0 0 / 50%) syntax, and rgba() is kept for compatibility. If your project must work in old browsers, use rgba().

Is alpha written as a decimal or a percentage?

Both are valid in modern CSS. rgba() usually takes a decimal between 0 and 1, and the rgb(r g b / a) syntax accepts both 0.5 and 50%.

Does an element with alpha 0 disappear?

It becomes invisible, but it still takes up space and can receive clicks. To remove it completely, use display: none or visibility: hidden.