home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomeWeb Design in a NutshellSearch this book

19.2. 8-Bit Indexed Color

GIF files are indexed color images that can contain a maximum of 8-bit color information (they can also be saved at lower bit rates). This means they can contain up to 256 colors -- the maximum number that 8 bits of information can define (28 = 256). Lower bit depths result in fewer colors and also reduce file size. This is discussed in Section 19.8, "Minimizing GIF File Sizes" at the end of this chapter.

"Indexed color" means that the set of colors in the image, its palette, is stored in a color table. Each pixel in the image contains a reference (or "index") to a table cell containing the color for that pixel. In Photoshop, you can view the table for an indexed color image by selecting Image Figure 19.2 Mode Figure 19.2 Color Table.

When you convert a 24-bit (millions of colors) image to GIF, it is necessary to first convert the image to Indexed Color mode, and as part of that process, reduce the number of colors to a palette of 256 or fewer colors. The image-editing tool does its best to approximate the full color range by using the most appropriate colors to approximate the image (an "adaptive" palette). You can specify an alternate set of colors to use in this process, such as the web palette. See the sidebar "Common Palettes" in Chapter 22, "Designing Graphics with the Web Palette" for descriptions of other color palette options.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.