If it turns off when you hit a bump then maybe it needs a bump with the test lamp, but since those colors don't match the wiring diagram in the FSM, I presume you're looking at the headlight subharness. Colors on that are determined by the vendor and not shown in the manual. The connector to the car should be 4 pins with Red/Yellow, Red/White, Red/Blue, and Black wires. R/Y and B will be for the low beams with R/Y being positive. Trace those out through the subharness and you should get to the correct signals. See EL-38 here:
https://www.nicoclub.com/service-manual ... System.pdf