Answer 3:
This is a very good question. It has to do with
the way colors of light are added. First of all,
you have seen how a prism splits white light into
a rainbow of colors, so you know that white light
contains all these colors. If you shine red
and blue and green lights together in equal
proportions, you can make white light; If you take
white light and subtract out one of these primary
colors, you get the resulting primary pigment.
Adding colors on a computer screen is done by
adding varying amounts of red, blue, and green
light to make a color of light. Cyan = B + G =
White - R, and magenta = R + B = White - G, and
yellow = R + G = White - B. The colors in the
computer are given numbers between 0 and 255, in
each color (RGB) register. (0,0,0) is black, and
(255, 255, 255) is white. So, it depends on the
amount of R, G, and B that are used to make cyan,
magenta, and yellow. Since each program operates a
bit differently, it depends on just how much
"color" you end up with after you add the colors
... for example: cyan could be made up as
(0, 255, 255), then magenta would be (255, 0, 255)
and yellow would be (255, 255, 0), so when you add
them you would not get black. Computer colors
are LIGHT colors, and mixing light is color
ADDITION, and adding pure R + G + B light gives
you white. But when you add pigments on paper, as
in with paints or crayons, you are adding colors
by SUBTRACTION, so C + Y + M = black, not white,
because cyan is really White - red, and magenta is
really white - green, and yellow is really white -
blue. That is, if you shine white light onto a
purely cyan colored piece of cloth, it will look
cyan because it absorbs the red light component
from the white light, and reflects the green and
blue components, thus appearing cyan to your eye.
(But if you shine red light on a purely cyan
object, it will appear BLACK because it absorbs
all red light that falls on it, and if you give it
nothing to reflect, it will appear black! Cool,
try it!) This is a SUBTRACTIVE process,
whereas if you mix green and blue lights in equal
proportions, you will make cyan light - which is
an ADDITIVE process. The computer screen is
mixing colors by ADDITION, that is, by ADDING
colors of light, rather than subtracting out
colors of light and REFLECTING only certain colors
of the rainbow. Now, in some computer programs,
colors are defined by the ADDITION of the RGB
components, in an 8-bit integer, like this:
For example, the number 5,431 is 51000 + 4100
+310 + 11, right? Each column or place value
in our decimal counting is a power of 10. 1 =
100; 10 = 101; 100 =
102; 1000 = 103 Now,
you can represent a color on a computer screen as
a number like this, in "RGB", where the red value
is R x 2562, the green value is G x
256, and the blue value is Bx2560 or
just B. Cyan could be written then, as
0x2562 + 255x256 + 255 0r 65535;
magenta would be 255x2562 + 0x256+255
or 16711935, and yellow would be
255x2562 + 255x256 + or .1677696.
White would be 255x2562 +
255x256+255 = 16777215. So when you add up
C+Y+M like this, you will get a residual which is
grey, and you then have to darken this. To make
life even more complicated, many programs work in
hexadecimal, or "base 16", which means that you
have to add 6 "digits" above the numeral 9 , so
that to count in hexadecimal you count
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. So just as in
our usual base 10, or decimal system, 10 means
1x10 + 0x1, writing 10 in hexadecimal means
1x16 + 0x1, or 16. The numeral 10 in hexadecimal
is equivalent to 16 in decimal. In decimal system,
the columns to the left of the decimal point mean
powers of 10, in hexadecimal, they mean powers of
16. The ones column still means ones (because
anything raised to the zero power is still one,
and the "ones" column is really 160 in
hexadecimal), but the next column to the left
means "sixteens" or 161; the next
column to the left means 162 or
"two-hundred-fifty-sixes". So, in hexadecimal
FF is equivalent to the decimal number 256, or
15x16 + 16. That is how you may have to display
numbers in certain programming languages... for
example, in HTML the numbers are indicated in
hexadecimal, but in Visual Basic they are
indicated in decimal equivalents, like the numeric
example I gave you above where I was multiplying
by powers of 256. Just another comment - in
hexadecimal, as I said, the columns of numbers go
as powers of 16, if you recall that 16 = 4x4 or
42, and 4 = 2x2, then 16 = 2x2x2x2 =
24, and 162 then is
24 x 24 which is
28, so 256 = 162 =
28, and that is what they mean by
8-bit color representation! Name Click Here to return to the search form.
|