Information that is easy to digitize:
Digitizing Colors

Colors can be represented by digital bits. One method is to first convert the color into a set of three numbers, and then convert the numbers into binary. The three numbers represent the amount of red, green, and blue in the color. This system is called an RGB representation (for Red-Green-Blue). We might decide to rate how much of each of the three colors is present by giving it a number from 0 (meaning none) to 255 (meaning a lot of that color). Here are some examples:

red square
Blue square

Red: 255
Green: 0
Blue: 0

Red: 0
Green: 0
Blue: 255

Binary:
111111110000000000000000

Binary:
000000000000000011111111

Green Square
Purple Square

Red: 0
Green: 255
Blue: 0

Red: 128
Green: 0
Blue: 255

Binary:
000000001111111100000000

Binary:
100000000000000011111111

If you look closely, you'll note that the binary representation uses 24 bits, 8 for each color. The first 8 bits are for red, the second 8 bits are for green, and the final 8 bits for blue. For example, in the last color above (a bluish purple), the red value of 128 written in binary is 10000000, the green value of 0 is 00000000, and the blue value of 255 is 11111111. Because computer memory is usually arranged in groups of 8 bits (called a byte), most color schemes use a total number of bits that is a multiple of 8. Twenty-four bits are often considered sufficient to represent colors with enough shades to faithfully reproduce a photograph (called "photo-realistic"), although some people believe 32 or even 48 bits are necessary.

 

Previous Page Next Page

 

 

 


These pages were written by Steven H. VanderLeest and Jeffrey Nyhoff and edited by Nancy Zylstra
©2005 Calvin University (formerly Calvin College), All Rights Reserved

If you encounter technical errors, contact computing@calvin.edu.