As its been stated, the electricity doesnt care what color wire its in, just make sure both ends of the extension cord are wired up correctly. The only "issue" most people will argue is that the 10-30R has no true "ground" since it uses a neutral. My reply to that is simply that if the outlet is on its own true dedicated circuit as it should be, the neutral wire should have zero voltage potential because its bonded to ground back at the panel. So unless the appliance running off the plug is using only 120 volts and not the full 240, the neutral wire for all intents and purposes would be a ground.
That said, on the 10-30R you have on the wall, the "L" shaped pin will be neutral, the two blades are hots.
On the 6-50P on the welder, the two blades are hot, the "round" "D" shaped pin is ground.
Thus, get yourself some 3 conductor wire as mentioned and connect the 3 wires on each end to the corresponding pins. Hot to hot (doesnt matter which one, they each carry 110 volts), and just make sure the ground pin connects to the neutral pin.
Hope that helps.
~T.J.