Glowsticks contain three main components—a dye, diphenyl oxalate, and hydrogen peroxide. The hydrogen peroxide is the chemical you release when you “crack” or activate the glowstick. Diphenyl oxalate reacts with the hydrogen peroxide to generate a molecule called dioxetanedione. This particular molecule decomposes to release two molecules of carbon dioxide and energy that excites a dye molecule to a higher energy state. To get back to its stable state the dye releases a photon of light, making your glow stick glow. The particular structure of the dye molecule controls the wavelength (color) of this light, which is how you can get glowsticks in different colors.