Instead of storing the actual 24 bit color for each pixel in a file, individual pixels are often stored as index numbers into a color map. |
The color map itself gives the 24 bit value for each index. |
A typical color map has from 16 to 256 entries, so the number of bits used to store an index is only 4 or 8 bits, compared to the full 24 bits, resulting in significant savings of space in typical size images. (Of course, the color map itself also has to be stored.) |
Color maps are almost also used in screen controllers, sometimes called frame buffers, to minimize the memory needed to store the image. |