| |||||||||
Transparency is possible in GIF and PNG files.
One colour entry in a single GIF or PNG image's palette can be defined as "transparent" rather than an actual color. This means that when the decoder encounters a pixel with this value, it is rendered in the background color of the part of the screen where the image is placed, also if this varies pixel-by-pixel as in the case of a background image.
Applications include:
The edges of characters and other images with transparent background should not have shades of grey: these are normally used for intermediate colors between the color of the letter/image and that of the background, typically shades of grey being intermediate between a black letter and a white background. However, with e.g. a red background the intermediate colors would be dark red, and grey edge pixels give an ugly and unclear result. For a variable background color there are no suitable fixed intermediate colors. PNG also allows partial transparency, which solves this problem. However, e.g. IE does not support partial transparency. See also Typeface#Monochrome or with shades of grey and Anti-aliasing.
A suitable bitmap graphics editor shows transparency by a special pattern, e.g. a chessboard pattern.