Violet light moves slowest through glass while red light moves fastest through glass compared to other visible light. So violet and red refract at different angles.
Explanation:
Violet travels the slowest so it is on the bottom and red travels the fastest so is on the top. This is because what is called the index of refraction, (the ratio of the speed of light in a vacuum to the speed of light in a material), is increased for the slower moving waves (i.e. violet).