The headlamp on my bike has three colored-wires.
Of the three wires, two are from a 2-wire connector (blue and green) but one is a single wire (orange), on my motorcycle.
If you take off the headlamp from the nacelle and look inside, do you see an unattached 2-wire male-counterpart.
Have you checked the voltage of wires in this connector ? Does it change when you press any switch ?
The color of wires could be different in your bike or may be same as mine.PS - If everything is working (headlight, rear light etc. ), then it could be an extra live wire for you to add a tachometer to your bike
. Well, it is a vestige (like human appendix) from a wiring circuit for Indian bikes which have an extra bulb. So you can use it to charge phone or GPS !
If you look carefully in my second photo, my bike also has an extra live wire - it is a loose green tubular connector in right corner (behind 2-wire connector). Not all bikes have it. Only a few lucky ones do
.