The white light which is evidently colourless light as daylight or sunlight contains all the wavelengths of the visible spectrum (also known as optical spectrum) at equal intensity. It is a combination of colours; red, orange, yellow, green, blue, indigo and violet. They are always in the same order. (The mnemonic ROY G. BIV is commonly used by students to remember the visible or optical spectrum in there order.)
The spectrum does not include all the colours that the human eyes and brain can perceive. The colors only visible to the human eye are those with wavelengths in air from about 380 - 790 nm (nanometre).
Things appear to have colour because of the colour of the light that is reflected back from them when white light hits them. If red light is reflected, an object will appear red.
The rainbow is an arc of colours visible in the sky. Rainbows appear when the sunlight or the white light meets the millions of water droplets in the atmosphere. Then the light refraction will take place at the dividing line of air and water (this dividing line is termed as prism). The light enters the droplets where it is split up into seven colours, unveiling the colours of the spectrum and said as the colours of the rainbow.
The link that follows will explain and illustrate how the seven colours of the spectrum refract… The Rainbow.