All colors of light travel at the szrme speed in a vacuum. When these enter a transparent substance like a prism, all slow down by different amounts depending on their wavelength. As these slow down by different amounts, different colours are refracted through different angles.