Opposite charges attract; like charges repel :)
Photon energy is directly proportional to the frequency of electromagnetic radiation.
(That would also mean that it's inversely proportional to the wavelength.)
So the photon energy increases as you scan the chart of visible colors
moving from the red end of the rainbow to the blue end.