Cartoon of the photoelectric effect
This animation shows incident light on a metallic surface. The colour of the light changes from dark red, through the colours of the rainbow, finishing with violet. In the code, this spans the wavelength range of 700 down to 350 nm. At 580 nm (yellow), the photon energy (approximately 2.2 eV) is just enough to overcome the work function, , and an electron begins to emerge from the surface. Its subsequent distance from that surface and the length and colour of the arrow connecting its origin to its present position are meant to represent the electrons kinetic energy, i.e. .