The phenomenon due to which seven colors will be produced when a ray of light passes through prism is called dispersion. White light is made up of seven bands of colors each having different wavelengths. When this light passes through a prism, each color travels with a different speed which forms a different angle of refraction. Hence it will split up into seven colors.