Blog
All articles Guides

RGBA, Hex Alpha and Opacity, Finally Explained

By the Paleta team·14 July 2026·~4 min read

You added a fourth number to your colour and the whole thing changed under your hands. A pink that isn't quite pink. A shadow that reads differently over white than over grey. Alpha does that. It's the least understood value in every colour you write, and once it clicks you'll stop guessing.

The first three numbers describe a colour. The fourth describes how much of the colour actually lands. That's the whole idea. But the consequences are sneakier than they look, so let's take them one at a time.

The fourth value, plainly

In rgba(77, 171, 247, 0.5), the last number is alpha: how opaque the colour is. Zero means invisible. One means fully solid. Everything between is partial.

Eight-digit hex says the same thing with two extra characters. #4dabf7ff is fully opaque. #4dabf780 is roughly half. Those last two digits run from 00 to ff, same as the red, green and blue pairs before them. So 80 in hex equals about 0.5 in decimal. Modern browsers read both. Pick whichever your eyes parse faster.

Why a transparent colour is not a lighter one

This is the part people get wrong for years. A colour at 50% alpha is not the same as a solid, paler version of that colour. It only looks that way over a white background.

Here's the mechanism. A transparent colour composites — it blends with whatever sits behind it, pixel by pixel. Put your half-opacity blue over white and you get a soft, washed blue. Put the exact same blue over black and it turns dark and moody. Over a photograph? It shifts with every region of the image underneath. The colour never changed. Its backdrop did.

A solid tint has no such loyalty to the background. #a6d5fb is that pale blue, always, on any surface. Fixed. Predictable. That difference is the entire decision, and most alpha mistakes trace back to ignoring it.

When transparency is the right tool

Reach for alpha when you genuinely want the layer to react to what's beneath it.

  • Overlays. A dark scrim over a hero image so white text stays legible — rgba(0, 0, 0, 0.5) is the workhorse. It dims the photo without hiding it.
  • Shadows. Real shadows are never solid grey. They're a translucent black that lets the surface colour bleed through, which is why rgba(0, 0, 0, 0.15) looks like a shadow and #d9d9d9 looks like a smudge.
  • Tints over media. A brand wash across a video or texture, where you want the detail to survive underneath.

When a solid colour wins

Flip the logic. If the surface behind an element is a known, flat colour, a solid tint is almost always the smarter call.

Say you want a faint blue background for a card sitting on white. You could write rgba(77, 171, 247, 0.12) and it'll look fine. Until that card lands on a grey section, or overlaps another panel, and suddenly the tint muddies. Bake it instead. Compute the flat colour once and use that. It renders faster, it never surprises you, and it survives being moved. To find that baked value, drop the transparent version onto your real background in the Picker and read off the solid colour your eye actually sees, or convert the composite in the Converter to lock a HEX you can reuse.

Reading and writing alpha without the headache

A few numbers worth keeping in your head. 0.5 alpha is 80 in hex. 0.25 is 40. 0.75 is bf. Not exact, close enough for eyes. When you need precision — a design token, a value another tool has to match — don't do the arithmetic yourself.

Let the Converter move a colour between rgba() and 8-digit hex so both halves of your codebase agree. And when you're inventing an overlay from scratch, the Picker lets you nudge alpha live and watch the composite shift, which beats typing numbers and refreshing.

Common questions

Is rgba() or 8-digit hex better?

Neither is better; they compile to the same pixels. Use 8-digit hex when the rest of your colours are hex and you want one consistent format. Use rgba() when a teammate needs to read the alpha at a glance, since 0.5 is more obvious than 80.

Why does my semi-transparent white look grey?

Because it's compositing with something dark behind it. White at 40% over a black panel isn't white — it's the average of the two. If you wanted a clean pale colour regardless of backdrop, you wanted a solid tint, not alpha.

Does opacity slow a page down?

Not in any way you'll feel from a colour's alpha channel. The opacity property on a whole element can trigger extra compositing work when animated, but an rgba() fill is cheap. Write it freely.

Alpha isn't a dimmer switch — it's a blend instruction, and the background is half of every result. Once you know which backdrop you're really painting onto, the choice between transparent and solid makes itself. Open the Picker, set an overlay, and drag the alpha until it clicks.

Ready to try it? Every tool on Paleta runs free in your browser — no sign-up, nothing uploaded.

Explore the tools →