With visible electromagnetic energy (light), color is dependent on wavelength.

Click on the image below to access the Electromagnetic Radiation applet.

Check “Show Wave Color” and slowly slide the wavelength bar between Ultraviolet at 300nm (nanometers) and Infrared at 800nm.  You can see how the length of the wave changes as the colors change.

Source:  The electromagnetic spectrum, Lawerence Berkeley National Laboratory

Examine the image above.  Notice that each type of radiation has a continuum of values for wavelength, not just a single value.

For example, with infrared radiation, wavelengths range from about 10-6 meters (about the size of a bacteria) to 10-3 meters (about the size of a period at the end of a sentence).  Radio waves by comparison range in size from 10-1 meters (or the size of a baseball) to hundreds of meters long.

Likewise, each type of radiation has a continuum of values for frequency. (Frequency is measured in hertz (Hz  or s-).  One hertz = one cycle per second.) The frequencies of visible light range from 1015 hertz (waves per second) to 1014 hertz.

Now look at the wavelength scale at the top of the image above and frequency at the bottom of the image.  What happens to the frequency of the waves as wavelength gets longer?

Interactive popup. Assistance may be required.

As wavelength increases, frequency decreases.

Why?  The following video does a pretty good job of explaining.

Source: yeksub, What is Frequency and Wavelength? YouTube

So based on what you witnessed in the video, why does frequency decrease as wavelength increases?

Interactive popup. Assistance may be required.

Because it takes more time for the wave to travel longer distances.