When a light-emitting diode is switched on, electrons are able to recombine with holes within the device, releasing energy in the form of photons. This effect is called electro-luminescence and the color of the light (corresponding to the energy of the photon) is determined by the energy band gap of the semiconductor. An LED is often small in area, and integrated optical components may be used to shape its radiation pattern. LED's present many advantages over incandescent light sources including lower energy consumption, longer lifetime, improved physical robustness, smaller size, and faster switching. However, LED's powerful enough for room lighting are relatively expensive and require more precise current and heat management than compact lamp sources of comparable output.