Transparency in Images: The Alpha Channel Explained
Learn how alpha controls opacity, which image formats support transparency, and how to prevent halos when exporting transparent graphics.

Transparency is not a color; it is an additional channel that tells a renderer how much of a pixel should show. This is why a logo can sit cleanly on different backgrounds and why saving a transparent image as JPEG often produces an unexpected solid rectangle.

How alpha works
An alpha value controls opacity. In a common 8-bit alpha channel, 0 means fully transparent, 255 means fully opaque, and values in between represent partial transparency. RGB stores the color components; alpha stores the coverage or opacity information used when compositing.
- Fully transparent: alpha 0.
- Fully opaque: alpha 255.
- Semi-transparent: intermediate alpha values.
Which formats support transparency
PNG supports alpha transparency and is widely used for logos, icons, and interface graphics. WebP and AVIF also support transparency. JPEG does not have an alpha channel. When converting a transparent source to JPEG, the transparent pixels must be composited against a chosen background color.
- Use PNG for dependable editing and broad support.
- Use lossless WebP or AVIF when the delivery pipeline supports them.
- Choose a background explicitly before exporting to JPEG.
Avoid halos and jagged edges
A logo may look correct on a white canvas but show a pale fringe on a dark background. This can happen when edge pixels were matted against a previous background or when alpha was interpreted incorrectly. Inspect semi-transparent edges on both light and dark backgrounds before publishing.
- Preview on at least two contrasting backgrounds.
- Avoid repeatedly converting between formats with different alpha handling.
- Keep the original transparent master and verify the exported file retains alpha.
Why transparent edges sometimes look wrong
A semi-transparent edge pixel can contain color blended against a previous matte, such as white. When the logo is later placed on a dark background, that old matte can appear as a pale fringe. This is not necessarily a missing alpha channel; it can be a matte or premultiplication issue in the export pipeline. Re-export from the original artwork with the intended transparency and inspect the edge pixels over contrasting backgrounds.
- Do not erase a white background by selecting white if the logo itself contains white details.
- Avoid flattening the artwork before transparency is correctly prepared.
- Check the exported asset in the actual website component.
A checkerboard in an editor is only a preview convention. It is not part of the image; confirm transparency by placing the export over a real background.
Further reading: MDN: image formats and transparency