The semiconductor wafer is composed of two parts, one part is a P-type semiconductor, in which holes are dominant, and the other end is an N-type semiconductor, where mainly electrons. But when these two semiconductors are connected, a P-N junction is formed between them. When electric current acts on the chip through the wire, the electrons will be pushed to the P region, where the electrons recombine with holes, and then emit energy in the form of photons. This is the principle of LED light emission. The wavelength of light, that is, the color of light, is determined by the material forming the P-N junction.