There are three components of a lightstick. There need to be two chemicals that interact to release energy and also a fluorescent dye to accept this energy and convert it into light. Although there is more than one recipe for a lightstick, a common commercial lightstick uses a solution of hydrogen peroxide that is kept separate from a solution of a phenyl oxalate ester together with a fluorescent dye. The color of the fluorescent dye is what determines the resulting color of the lightstick when the chemical solutions are mixed. The basic premise of the reaction is that the reaction between the two chemicals releases enough energy to excite the electrons in the fluorescent dye. This causes the electrons to jump to a higher energy level and then fall back down and release light.