Sometimes we need the same image in two different colors (eg : enable/disable image) to show based on some conditions. So taking two images is not the right way. We need to use one image instead of two and based on some condition we need to change the color of the same image. So In…