If you want to build something like that from scratch, your two basic choices are to pick an LED that has a built-in color-fading circuit, or to use an external device (microcontroller, etc) to control an LED.
If using the former method — an LED with a built in fading circuit — you’ll basically just need the LED, a resistor, and a voltage source such as a battery holder. (We do sell some LEDs like this, but you’ll have to ask about them specially since we don’t yet have a product page for them.)
If using the latter method you could either use “traditional” RGB LEDs that have 4 or 6 pins, and use the microcontroller to vary the currents to the pins, or you could use a programmable LED type that you send pattern information to.
As for how your existing light works, it’s probably by a built-in fading circuit, but there’s some chance (as you note) that the control chip is external to the LED. Of course, it could also just be the resistor that’s hidden under a glue dot.