There are most likely three LEDs with different colors in that device which are driven by current pulses of different length and timing to achieve an arbitrary RGB color with the least amount of hardware. The result is that you are seeing a stroboscopic effect when you move your eyes fast enough to resolve the timing of the three colors.
If it's just a white LED with phosphors illuminated by a blue LED as in the answer by count_to_10, it could be the different phosphorescence times of the phosphors after a short pulse excitation by the one blue LED chip.