For the last while I have been concentrating on a project: developing an easily built spectrophotometer for low budget and DIY laboratories.
At the subatomic level, light is made up of entities called photons. Photons are electromagnetic vibrations; the speed at which they vibrate (in vibrations per second) determines the color of the light. Red light has a relatively slow vibrational frequency, while purple light has a faster one. The frequency also determines the energy that the the photon has: the faster a photon vibrates, the more energy it has. A photon of violet light has more energy than a photon of red light.
White light, like that from a halogen lamp, contains photons of a lot of different frequencies. However, you can use a prism or a diffraction grating to break that light up into its component colors, to get the familiar rainbow:
The above image is from a spectroscope I built during development. It’s made from bamboo, duct tape, pieces of beer cans, and an old CD: the perfect combination of steampunk, cyberpunk, and drunkpunk.