The visible spectrum is the narrow band of electromagnetic radiation the eye can detect, roughly from about \(400\,\text{nm}\) to \(700\,\text{nm}\). Within that band, colour is decided by wavelength, and the colours run in a fixed order of decreasing wavelength: red, orange, yellow, green, blue, indigo, violet. Red therefore sits at the long-wavelength (low-frequency) end and violet at the short-wavelength (high-frequency) end, so the colour with the longest wavelength here is red.
Approximate values make the ordering concrete: red is near \(700\,\text{nm}\), yellow near \(580\,\text{nm}\), blue near \(470\,\text{nm}\) and violet near \(400\,\text{nm}\). Because all colours travel at the same speed \(c\) in vacuum, wavelength and frequency are linked by \[c = f\lambda \quad\Rightarrow\quad f = \frac{c}{\lambda},\] so the longest wavelength automatically carries the lowest frequency and the smallest photon energy \(E = hf\). Violet is the exact opposite: shortest wavelength, highest frequency, most energetic photon.
A common slip is to assume that the brightest or most striking colour must have the longest wavelength, or to reverse the spectral order and choose violet. Fix the mnemonic ROYGBIV in memory and attach one fact to it: wavelength decreases from R to V while frequency and energy increase. In an examination this single ordering answers questions on longest or shortest wavelength, greatest or least deviation by a prism, and highest photon energy.