LED with an onboard circuit
These smart flashing RGB LEDS have an inbuilt IC which blinks/toggles the 3 separate RGB LEDs located inside.
All one need to do is to provide a DC supply, the IC will randomly switches the colour.

Checkout this one,
https://www.sparkfun.com/products/11450

In datasheet you can see the application diagram showing IC &amp; three individual R,G &amp; B LEDs.