Electronic – Why do some RGB LEDs have six legs

ledrgb

Others have four legs, which makes sense to me, as ground can be shared.

One of many examples of a six legged RGB LED is the Kingbright KAF-5060PBESEEVGC.

Best Answer

According to the datasheet, it has six legs because it contains 3 LEDs, with nothing common:

schematic from datasheet

Many RGB LEDs have a common cathode or common anode, so need only 4 leads. For some applications that may not be acceptable. For example, it wouldn't be possible to control two RGB LEDs with common cathodes or anodes in series, or to arrange them for charlieplexing.

Further, a part like this is at least more flexible. It can be made common anode, or common cathode. Or, a pair of the LEDs may be arranged in anti-parallel. It may make more sense in some situations to stock just one part than to stock several different parts to cover different cases.