Indexed color is a method of storing and displaying digital images using a limited color palette. It reduces the memory and storage space needed to display an image by referencing entries in an image's palette (called its color lookup table) instead of specifying a full RGB value. GIF images use indexed color exclusively, and PNG and TIFF images may also use indexed colors to save storage space.
Full-color digital images use 24 bits per pixel to define each pixel's color, out of more than 16 million possible values. Referencing an entry in a color lookup table instead uses less data, depending on the size of the color lookup table. Choosing one of 256 possible colors requires 8 bits; a smaller 16-color palette only requires 4 bits per pixel.
Image editing programs generate a color lookup table whenever they save an image in an indexed color format. The program analyzes the image to identify the most common colors, and then creates a palette from the results. Images with a lot of subtle color shades or smooth gradients will have trouble limiting the palette to 256 (or fewer) colors. In these cases, dithering blends colors together by mixing two separate colors in patterns — when viewed by a human eye, these patterns blur together slightly to create a new color between the two.