Color comes from the visible spectrum of light. The colors that make up white light from longest to shortest wavelengths are red, orange, yellow, green, blue, indigo and violet. In any system of colors, those that cannot be mixed from any of the others are called primary colors. The primary colors of light are red, green and blue. From these three colors, every other color of light can be made.
Paint pigments mix differently than light.
The type of color mixing familiar to most artists is that done not with lights but with paints or pigments. Each color of paint can be thought of as a filter that removes all of the light frequencies except the one meeting the eye. Primary pigments in paint can vary, however red, yellow and blue are the most common ones. Mixing primary pigments with other colors results in darker colors as more of the light energy is absorbed. The absorbed energy becomes heat and that is why, for instance, white cars are cooler than black ones.