Color is defined by the frequency. The wavelength changes according to the medium and if the light enters a glass it slows down,so the wavelength of the light shortens proportionally,and since we have: f=c/λ , the frequency remains the same.
When electromangneel waves travel in the frequency range of red coulour we see it as red .
Thus , frequency is like the identity of the color .We see a colour according to frequency of the wave.
Hope this helps you .