When mixing paints and dyes, the three primary colors, red, yellow and blue, combine with each other in specific ways to form the secondary colors, green, orange and purple as well as other shades and hues. Monitors and other screen displays use the RGB color system, which uses different amounts of those three colors along with varying levels of hue, saturation and luminosity to create different colors with pixels reprsented by color codes.
When working with paints, crayons and other dyes, mixing red and yellow creates orange. Blue combines with yellow to make green, and blue and red make purple. Adding a small amount of white or black respectively creates lighter of darker shades of any color. This may even create a distinct color as happens when red or black combines with white to make pink or gray.
White light, although it seems clear, is actually a combination of all the light along the entire rainbow spectrum. When the light passes through prisms, such as crystals or raindrops, the different colors of light refract in different directions giving the appearance of a rainbow. Black is the absence of any colors of light, otherwise known as visible wavelengths on the light spectrum.