Light is treated as heat in traditional thermodynamics. Photons are assigned a temperature but zero chemical potential. In processes such as photovoltaic or photochemical absorption, electroluminescence and chemiluminescence, the number of photons is related to that of other energy quanta, e.g. electron—hole pairs or chemical excitations. This leads to a non-zero chemical potential of photons allowing the treatment of these processes by analogy with ordinary chemistry: equilibrium is reached when the sum of the chemical potentials, including that of photons, is zero.