The black wire is ground. The other colors you mention don't match the factory wiring diagram but with a test light and the instructions that came with your headlights maybe you can figure it out.