I have an outlet that’s connected to a switch. You’re supposed to plug in a lamp. But I want to remove the outlet and connect wires to run a ceiling light. When I took I off the outlet the wire colors were white, yellow and pink. Which one do I connect to my Romex wires that are white, black, and the ground? Any help is greatly appreciated!
Can’t do it
The unusual wire colors mean one thing: this house has conduit for its wiring. That would only happen if your jurisdiction requires it.
It’s rather unfortunate. If you had spent hours watching Youtube videos on extending circuits with metal conduit, you’d be eager to get into what happens next. Sadly you watched videos on extending circuits with “Romex” (NM-B cable), so you have a strongly held expectation that you’ll be doing that next.
You can’t. It’s illegal. At the time you’re selling your house, the inspector will flag it, and you’ll have to pull a permit to tear it out, tear it out, pull another permit to put it back in, then put it back in right.
You’ll need to run up to the lamp location with conduit, using proper conduit laying methods. At that point you can get some THHN wire, a white wire for neutral and red for switched-hot, from the switch to the lamp inside the conduit.
Neutral is the white one, and probably does not go to the switch. A voltage tester will show one is always-hot; that goes to the switch. The other one will be hot when the switch is on; that one goes to the switch and lamp.
Yellow and pink are normally legal to use for hots and switchlegs, but are unusual. You also didn't clearly indicate if those three wires are directly connected to the receptacle, or if there are multiple connections feeding through the box. So I will assume the three wires mentioned are the only 3 wires in the box, and are directly connected to the receptacle.
Since yellow and pink are not standard colors for cable systems I am guessing you have conduit, and the conduit provides the ground to the box. There should be a hole in the back of the box that will accept a 10-32 ground screw to connect the ground to the box. Normally the ground should also be spliced and connected to the receptacle too.
You can just attach the white wire to another silver screw or by pressing into a hole on the same side of the receptacle, but many electricians prefer disconnecting the white from the receptacle, attaching a short piece of white wire to the receptacle, then using a wire connector to connect all the whites together.
Then there can be a lot of variables if there are multiple or unmentioned wires, and could make the answer misleading. Guessing the yellow and pink are both connected to the receptacle remove the wire connected to the switched top or bottom half, and connect it to the black from your new Romex (or other brand of NM cable). Then to restore power to the half of the receptacle you just disconnected remove the remaining pink or yellow from the hot half, connect short pieces of wire to both the top and bottom half (on the brass screw/short slot side) and connect both of those wires to the one you just disconnected.