A light-emitting diode (LED) is a two-lead semiconductor light source. It is a basic pn-junction diode, which emits light when activated. When a fitting voltage is applied to the leads, electrons are able to recombine with electron holes within the device, releasing energy in the form of photons. This effect is called electroluminescence, and the colour of the light (corresponding to the energy of the photon) is determined by the energy band gap of the semiconductor. Early LEDs were often used as indicator lamps for electronic devices, replacing small incandescent bulbs.