White light is a mixture of three basic colors known as primary colors. They are red, blue and green. These colors have different wavelengths. Combinations of these colors at different proportions create different types of colors. When the white light falls on any surface, some of the wavelengths of the light are absorbed by the surface while some are reflected back based on the properties of the surface material. Colour of the material is detected when these reflected wavelengths fall on the human eye. A material reflecting wavelengths of red light appears as red. The component used to detect colors is the Color sensor.