IMO, the problem with connecting a charger to the headlight wires (orange/blue/green) is only the blue & orange (high beam and ground) or the green & orange (low beam and ground) will be turned on at any one time.
Say the charger was connected to the blue & orange wires. It would only work when the headlight was in the High beam position.
Most RE's also have a gray wire close to the headlight.
This gray wire is often unconnected because it is the power wire for the small "parking" bulb that is inside some headlight shells. This is never used with a sealed beam headlight.
Any how, the gray wire always has power if the light switch is in the Parking or Headlight on position. It is turned off only if the light switch on the handlebars is in the OFF position AND the switch bypass wire was removed from the headlight casquette.
If your charger is the type made for plugging into a cigarette lighter or hooking up directly to a 12 volt wire in a car, you do NOT want AC power going to it.
If you try hooking up a USB wire directly to the motorcycle you will fry any USB device you might have plugged into it. (USB power is 5 volts DC. 12-14 volts AC or DC that might be lurking on your motorcycle is way too much.)
Anyway, that's my opinion for the moment.