The reaction between CPPO and hydrogen peroxide produces organic peroxides, which decompose, producing CO2 and energy. The added dye (Rhodamin B) receives this energy and releases it as photons. The colour (frequency) is determined by the dye structure.