Color Converter (HEX, RGB, HSL)β†’Specialized Version
🎨

HEX to RGBA Converter

Convert HEX to RGBA

HEX in
#3B82F6
RGBA out
rgba(59, 130, 246, 1)
RGB
HSL

All formats

Lightness variations

HEX to RGBA Converter

Convert HEX color codes to RGBA format with transparency support. RGBA extends RGB by adding an alpha channel for controlling opacity, essential for overlays, shadows, and transparent design elements.

Understanding RGBA

RGBA adds a fourth value to RGBβ€”the alpha channel:

  • R: Red (0-255)
  • G: Green (0-255)
  • B: Blue (0-255)
  • A: Alpha/Opacity (0-1 or 0%-100%)
Alpha value of 1 = fully opaque, 0 = fully transparent.

HEX to RGBA Conversion

Standard 6-character HEX (#RRGGBB) converts to RGB with alpha manually specified:

HEXRGBA (50% transparent)
#FF0000rgba(255, 0, 0, 0.5)
#0000FFrgba(0, 0, 255, 0.5)
#333333rgba(51, 51, 51, 0.5)
8-character HEX (#RRGGBBAA) includes alpha:

8-Digit HEXRGBA
#FF000080rgba(255, 0, 0, 0.5)
#0000FF40rgba(0, 0, 255, 0.25)
#00FF00FFrgba(0, 255, 0, 1)

Common RGBA Use Cases

Use CaseExample
Modal overlayrgba(0, 0, 0, 0.5)
Button hoverrgba(255, 255, 255, 0.1)
Text shadowrgba(0, 0, 0, 0.3)
Glass effectrgba(255, 255, 255, 0.2)

CSS RGBA Syntax

``css .overlay { background-color: rgba(0, 0, 0, 0.7); } .glass { background: rgba(255, 255, 255, 0.25); backdrop-filter: blur(10px); } `

Use this converter to add transparency to your HEX colors for modern UI designs.

HEX and RGBA

HEXRGBA
Syntax#RRGGBB, or #RGB shorthand, or #RRGGBBAA with alphargba(255, 99, 71, 0.5), or rgb(255 99 71 / 50%) in modern CSS
Channelsred, green, blue β€” each 0–255 written as two hex digitsred, green, blue plus alpha from 0 (transparent) to 1 (opaque)
Precision8 bits per channel, 16.7 million colours8 bits per colour channel; alpha is a float
SupportUniversal. The 8-digit alpha form needs a 2020-or-later browser.Universal.
Best forDesign handoff, CSS, anywhere a colour is written as a single token.Overlays, shadows, disabled states β€” anywhere the colour must let the layer below through.

A Worked Example

Taking CSS tomato through every format:

FormatValue
HEX#FF6347
RGBrgb(255, 99, 71)
RGBArgba(255, 99, 71, 0.5)
HSLhsl(9, 100%, 64%)
HSBhsb(9, 72%, 100%)
CMYKcmyk(0%, 61%, 72%, 0%)

Doing It in Code

`javascript // HEX to RGB const hexToRgb = (hex) => { const n = parseInt(hex.replace('#', ''), 16); return { r: (n >> 16) & 255, g: (n >> 8) & 255, b: n & 255 }; };

// RGB to HEX const rgbToHex = (r, g, b) => '#' + [r, g, b].map((v) => v.toString(16).padStart(2, '0')).join(''); `

Modern CSS can do a lot of this without any conversion at all: color-mix() blends two colours, and relative colour syntax β€” hsl(from var(--brand) h s calc(l + 10%))` β€” derives a lighter shade without you ever computing one.

Frequently Asked Questions

What is RGBA when working with HEX to RGBA?

RGB with an Alpha (transparency) channel, where alpha ranges from 0 (transparent) to 1 (opaque).

Does HEX support transparency?

8-digit HEX (#RRGGBBAA) supports transparency, but 6-digit does not.

How do I make a color 50% transparent?

Use alpha value of 0.5, like rgba(255, 0, 0, 0.5).

Related Tools

Explore other tools you might find useful:

More Color Converter (HEX, RGB, HSL) tools

You might also need