It works on RDC(Rippled Direct Current) from AC by the full wave diode bridge, and as the ripples changes voltage, the transistors shut the amperage down as the voltage gets "high"(RED LEDs) and the transistors shut the amperage down as the voltage gets "low"(BLUE LEDs).