The image below is a simplified example of how the colourization of your image is achieved.