Light is a small part of the huge electromagnetic spectrum, which also includes heat, radio waves and microwaves. The part that we call light is distinguished by the fact that we can detect it with our eyes. The light from the sun includes the entire range of wavelengths in the visible spectrum, and incandescent lights come very close to doing the same. Fluorescent lights, on the other hand, have significant gaps in their spectrum, and mercury vapor and sodium vapor street lights are noticeably blue and yellow, respectively.
White paint looks white in sunlight because it reflects all of the colors of light. Under blue light, it appears blue. Under green light, it appears green. Black paint, on the other hand, appears black under any color of light, because it does not reflect any of them. Other paints reflect some colors, but absorb others. If a paint absorbs blue light, it appears yellow. Because paint derives its color by absorbing light, the mixing system used for paint is called the subtractive system.
The terminology of colors can become confusing because the primary colors are often called blue, yellow and red. In fact, the primary colors of pigments are cyan, yellow and magenta, which give the CYMK name to one color system the computers can use (the K generally stands for black). With pigments in those three colors, it is possible to produce a mix of any desired color.
The light detectors in your eyes are of two types, rods and cones. The rods are only sensitive to light and dark--they do not see colors. The cones come in three varieties: red-sensitive, green-sensitive and blue-sensitive. We perceive yellow when the red and green cones are activated. Cyan activates the blue and green cones, and magenta is what we call the combination of the blue and red cones. Because the various colors are the result of more than one kind of cone being activated, this is called the additive system. Computer programs call this the RGB system, and computer screens actually only have red, green and blue dots on them.
Light may be of any color, paints absorb colors from light, and our eyes only see the light that is reflected into them. If a yellow chair is illuminated by white light, it will appear yellow, because it absorbs blue and reflects green and red to our eyes. If only blue light shines on the same chair, it will appear black, because it absorbs blue light, and there is nothing left to reflect. Under red light, it will look red because, although it can reflect red and green, there is no green to reflect. And finally, under green light, it will look green because there is no red to reflect.
Every color we see is similarly the result of the light that falls on an object, the color the object is painted, and the way our eyes interpret the signals they get from the color-sensitive cones.