Hex Opacity Converter (8-Digit Hex)

Add an opacity level to a hex colour, or read the opacity from an 8-digit hex code.

Transparency in a hex code

A hex colour can carry an alpha channel — an opacity level — as two extra digits on the end, turning a 6-digit code into an 8-digit one. This adds a chosen opacity to a hex colour and reads the opacity from an 8-digit code, so you can work with semi-transparent colours in hex form.

Enter a hex colour and an opacity to get the 8-digit code.

Where transparent colours are used

Semi-transparent colours are everywhere in modern design: an overlay that darkens an image so white text is readable, a subtle tinted panel that lets the background show through, a soft shadow. The 8-digit hex format packs the colour and its opacity into one value, which is convenient where a single colour code is expected. It is worth knowing the alpha is often easier to reason about in the RGBA or HSLA formats, where opacity is a clear separate value, so which form to use depends on the context. Converting between a colour and its opacity in hex takes the guesswork out of those last two digits, which are otherwise cryptic.

Questions & answers

What do the extra two digits on a hex colour mean?

They are the alpha channel — the opacity — turning a 6-digit hex into an 8-digit one that carries both the colour and its transparency.

Where are semi-transparent colours used?

Overlays that darken an image for readable text, subtle tinted panels, and soft shadows — anywhere the background should partly show through.

Is anything uploaded?

No. The conversion happens in your browser.

More Color & Design tools