pages bg right
Posted by mb on Ноябрь 10, 2008


Number of Colors

On the CD A computer video card can display a certain number of colors at a time—16, 256, thousands, or even millions (see Figures 3.18, 3.19, 3.20, and 3.21, and see the Color Gallery in the Figures folder on the CD-ROM for the color versions of the images). The number of colors is called color depth, which describes how many colors can be displayed on your screen at once. Color depth is described in terms of bits and refers to the amount of memory used to represent a single pixel. The most common values are 8-bit, 16-bit, 24-bit, and 32-bit color. More bits correspond to a wider range of colors that can be displayed.

Figure 3.18 This is an image in 16 colors.

Figure 3.19 This is an image in 256 colors.

Figure 3.20 This is an image in thousands of colors.

Figure 3.21 This is an image in millions of colors.
True color (24-bit color) is capable of displaying 16.8 million colors for each pixel on the screen at the same time. The human eye cannot distinguish the difference between that many colors. High color displays only 32,000 or 64,000 colors, but it is still a very impressive range of colors, enough colors for most work. The most limited in colors is 256 color. It stores its color information in a palette. Each palette can be set to any of thousands or millions of different color values, but the screen can’t show more than 256 different colors at once. Some games still use it because, like resolution, more colors means more data pumped to the screen. So if you can get away with only 256 colors, you can render (or draw) the game pictures to the screen faster. More recently, games are starting to use thousands of colors as the hardware permits.

Note The word render is used in games, especially real-time 3D games, as the computer and software literally renders or builds an image instantly, based on where you are in the 3D world. Hence the term interactive. In a movie, you watch each frame as it was created by the moviemaker. The frame is unchangeable. In a 3D game, you control how each frame looks by where you choose to go in the world and what you do. Each frame of your gaming experience is made for you on-the-fly, or as your experience is happening.

256-Color Palettes Explained
Hopefully, you will never need to know this, but here it goes. Each pixel can have a numerical value from 0 to 255 (a total of 256!). The screen knows only where to get the color from, but it does not know the color. Figure 3.22 shows the 256-color palette.

Figure 3.22 A 256-color palette. You can see only shades of gray here, but those squares are 256 different colors.
So follow me here. Say you have a picture, and you open the color palette to have a look. If you note that a certain color is assigned to the number 3 place on the color palette and then decide to reassign another color to the number 3 position, your image will now display that new color where the original color used to be.

Even if you have that original color in the palette, it will not be displayed where the number 3 position is being displayed. What this means is that a computer can’t distinguish color; it sees numbers. You will have to be aware of this for later tutorials. In Figures 3.23 and 3.24, you can see how the changing of one color affects the image.

Figure 3.23 This is a 256-color image.

Figure 3.24 This is the same image after changing the palette colors. The computer sees the number, not the color.

Now that we understand the basics of images, we can move onto the basics of manipulating images.

Нечто важное
FUEL ждет коллекционное  издание. FUEL ждет коллек... rating
Diablo III снова без LANa Diablo III снова бе... rating
Watchmen: The End is Nig 2 скоро увидит свет Watchmen: The End is Nig 2... rating
Негодование на полях Starcraft 2 Негодование н... rating
Случайное
Оставьте свой комментарий


Leave a Reply

You must be logged in to post a comment.