A color filter works by absorbing certain wavelengths of color and transmitting the other wavelengths. For example, a yellow color filter absorbs all colors except yellow, letting only yellow through, so the objects viewed appear to be yellow. If a blue light from a blue filter his a red object, the blue color is absorbed and the object reflects no light, making it appear to be black.
Light is the only source of color. Opaque objects show different colors by absorbing certain parts of the light spectrum and reflecting the parts that remain. The reflected color is the color that the object appears to the eye. Color pigment is made of atoms that can absorb light with a single frequency or a range of frequencies.
A filter is a transparent material that allows some colors of light to pass through while absorbing the rest of the colors. This process is called color subtraction. A filter lets the remaining wavelengths pass through instead of reflecting them like an opaque object. White light contains all the colors, while black is the absence of color. A color filter absorbs its complementary color. For example, a magenta color filter absorbs green, leaving the remaining color wavelengths to pass through the filter.