I swear, description below is not absolutely copypasted from :
https://www.electronics-tutorials.ws/blog/7-segment-display-tutorial.html
and being an expert believe me I perfectly understanding how works these wonderful components, the "colored potentiometers".
Description:
The emission of these photons occurs when the diode junction is forward biased by an external voltage allowing current to flow across its junction, and in Electronics we call this process electroluminescence.
The actual colour of the visible light emitted by an LED, ranging from blue to red to orange, is decided by the spectral wavelength of the emitted light which itself is dependent upon the mixture of the various impurities added to the semiconductor materials used to produce it.
Enjoy 🤡