Light / Colour
Light sensors sometimes use a component called a photodiode to measure illuminance. When beams of light strike a photodiode, they have a tendency to knock electrons loose, causing an electric current to flow. The brighter the light, the stronger the electric current.
A color sensor is a type of "photoelectric sensor" which emits light from a transmitter, and then detects the light reflected back from the detection object with a receiver.