Hello unknown. I would not normally answer questions to an unknown questioner, but, as it it such an interesting question I asked my friends for some comments.
You are right. Where does the colour come from? It was in 1671 that the famous scientist, Newton, discovered that white light was a mixture of different coloured lights. He did this by passing white light (the light from the Sun) through a glass prism. Look at what he got……….
Later it was found that some of the blue light in the Sun’s light had difficulty passing through the Earth’s atmosphere. this blue light was scattered as it passed through the atmosphere therefore giving the sky a blue colour.
Some of the blue light still got through and appears as part of the white light in the prism experiment and also in the rainbow. In the rainbow the drops of rainwater act as small prisms.
Hope this makes sense. if you want to give your name please let me know in the comment box.
(amended 21/9/18 – raindrops as prisms added)