When light (electromagnetic wave) is incident on a photodiode, electrons are ejected, which produces a current in the connected circuit. This current is also known as photocurrent.
If a sufficiently high negative potential is applied to the anode, it repels the incoming electrons and thereby stops the flow of current. This potential is known as the stopping potential.
The expression for the stopping potential is, . here, is Planck's constant, is the frequency of the incident radiation, is the threshold frequency and is the charge of an electron.
The value of the stopping potential depends on the maximum kinetic energy of the electrons, which in turn depends on the frequency of the incident light . The light with the maximum frequency will eject electrons with the maximum kinetic energy.
So, for high energetic electron maximum stopping potential need to apply.
Hence, the color that has the maximum stopping potential is violet.