We know, δm = (n21 − 1)A. Hence larger the refractive index larger the deviation. As refractive index of glass for violet is more than the refractive index of glass for red, hence deviation decrease if the incident violet light is replaced by red light.