Resources / Creating Animated Gifs / Transparency

Creating Animated Gifs - #4 Transparency
A major problem which you might encounter when creating animated gifs is that the background of the image does not blend so well with the background you are using. This can be solved in two ways:
- Change the background colour of the animation to the one in your webpage, or else
- Create a transparent background
The use of transparent backgrounds allow us to blend any kind of animation (or still gifs) to any background being used. Let us consider the following image.

This image blends well with the white background which this page has. The reason is that the background colour of the animation is also white.
Now lets change the background color. You will notice that the image will not blend so well as above.

Image does not blend well with the background
|
Let us now change the white background to a transparent one. The result is the following.

Image blends well with the background
|
|