When visible white light goes through a glass prism from one medium to another, distinct hues of light are refracted differently and exit the prism at different angles. It's producing a rainbow-like effect, which is known as dispersion of light.
The phase velocity of a wave is affected by its frequency in this phenomenon.
From bottom to top, visible light is composed of seven colors: violet, indigo, blue, green, yellow, orange, and red.
Violet light is the most deviated of any color, whereas red light is the least distorted.
Prisms were used to split light into its constituents with varying polarizations or to reflect light.
The degree of bending of the light's path based on-
The angle at which the incident beam of light forms with the surface and the ratio between the refractive indices of the two media
The refractive index of materials like glass varies depending on the wavelength or color of the light source.
White light is split into its component colors when it travels through a glass prism.