Transparency (graphic)

Most vector formats implicitly support transparency because they simply avoid putting any objects at a given point.

More complex vector formats may allow transparency combinations between the elements within the graphic, as well as that above.

Outside the world of web browsers, support is fairly hit-or-miss for transparent GIF files.

Some image formats, such as PNG and TIFF, also allow partial transparency through an alpha channel, which solves the edge limitation problem.

A major use of partial transparency is to produce "soft edges" in graphics so that they blend into their background.

Partial transparency can also be used to make an image less prominent, such as a watermark or other logo; or to render something see-through, such as a ghostly apparition in a video game.

Animating the alpha channel in an image-editing program can allow smooth transitions between different images.

The process of combining a partially transparent color with its background ("compositing") is often ill-defined and the results may not be exactly the same in all cases.

Some consequences of this are: This is important as it means that when combining three or more objects with this rule for transparency, the final color depends very much on the order of doing the calculations.

Human perception of brightness is not linear - we do not necessarily consider that a gray value of 0.5 is halfway between black and white.

An alternative model is that at every point in each element to be combined for transparency there is an associated color and opacity between 0 and 1.

To work with the above formula, the opacity needs to be scaled to the range 0 to 1, whatever its external representation (often 0 to 255 if using 8 bit samples such as "RGBA").

PDF transparency is a very complex model, its original specification by Adobe being over 100 pages long.

A key source of complication is that blending objects with different color spaces can be tricky and error-prone as well as cause compatibility issues.

However vector transparency flattening is extremely complex and only supported by a few specialist packages.

However, by the use of patterns, arbitrary graphics can be painted through masks defined by any vector or text operations.

A semi-proprietary technique pioneered in Photoshop and adopted by a number of pre-press applications is to store a clipping path in a standard location of the EPS, and use that for display.

GIF animation of an Apollonian sphere packing with transparent background
This image has binary transparency (some pixels fully transparent, other pixels fully opaque). It can be transparent against any background because it is monochrome.
This image has binary transparency. However, it is grayscale, with anti-aliasing , so it looks good only against a white background. Set against a different background, a "ghosting" effect from the shades of gray would result.
This image has partial transparency (254 possible levels of transparency between fully transparent and fully opaque). It can be transparent against any background despite being anti-aliased.
This image shows the results of overlaying each of the above transparent PNG images on a background color of #6080A0. Note the gray fringes on the letters of the middle image.
This shows how the above images would look when, for example, editing them. The grey and white check pattern would be converted into transparency.