I have an electric scooter and it's charger has an LED indicator, when the battery is not fully charged it emits red light and when it get fully charged the same LED turns green, how that is done ?, I know that it uses a different frequency for both color but how, after all an LED runs on D.C. so where does the frequency come in to picture?