Because of dispersion, different wavelengths refract differently.
In glass, blue and violet light are slowed the most and therefore are bent more.