I was taught that the colors we see are results of the corresponding wavelength, but each wavelength also has a distinct frequency since speed of light is fixed for a specific medium (same goes for sound).
$$ c = νλ,$$
where $c =$ speed of light in vacuum, $ν =$ frequency of light, and $λ =$ wavelength of light.
Now, I have also learnt that while the frequency remains unchanged in a refraction - both wavelength of light & speed of light change. Meaning - if the color of light depends on the wavelength, the colors of the spectrum shifts slightly depending on the refractive index, for medium to medium (but will go unnoticed to human eye).
As I understand it, if light travels from one medium 1 (say vacuum) to a medium 2 with refractive index µ, then -
cλ2 = vλ1 and c = µ*v
where - λ2 & λ1 are wavelengths of the same wave in medium 2 & 1 respectively, µ is the refractive index of medium 2 wrt 1 and v is the speed of light in medium 2.