My headphones have 4 wires instead of just 3
If the plug only has three and there are four wires (and its a nicer pair of headphones) it is probable that the current return is not shared in the cable. 

Get a multi meter an ohm out the pairs (set it on ohm mode), if the headphones are (say) 8Ω then if you put the positive on the blue and the negative on the white, then it should say 8Ω if those are a pair, if not then try the black. Then try the same thing with the red until you have them sorted out. 

You might be able to ohm out the cut cable on the 3.5mm end, if you still have it. Put one of the meter cables on one of the 3.5mm jack and then test all the pairs until you have continuity, then you can match them to the new jack.

Don't ask me what ohming does, you'll need to research that yourself, its an EE forum after all