A Guide to Color Coding of Electric Wires and Terminal Screws

Wires and power plug protruding from a wall during rewiring by an electrician.
Jill Ferry Photography/Moment Open/Getty Images

Have you ever wanted to learn what color wire goes where on switch and outlet terminals and why? It's interesting to me how many people don't know which colored terminal is for the "hot" connection and which are for the travelers on a three-way switch. Then again, I've seen my share of outlets wired with the "hot" and "neutral" wires switched on the outlet terminals.

That got me thinking that I needed to educate you all about wires colors, the terminals they attach to, and the function they serve in respect to connecting to terminals on switches outlets, and other connections you may not be aware of.

Looking over some of the questions and concerns you all have been having over the past four years, I get some interesting questions about how to do these connections. Some say they'd like to know, "What makes the difference where I put the "hot" wire versus the switch leg?" Then there's the comment that haunts me, "My outlet works just fine with the wires reversed on the terminals. So what's the difference?" Another I'll address is the question of why there is a white wire connected to my switch terminal. And let's not forget about lighting fixtures. There is always a question about why it makes a difference which of the two wires connects to the "hot" wire and which connects to the neutral wire. Some will say it doesn't matter. They have tried it connected both ways and the light works either way! So why do you talk of a right and wrong way to wire them?

Let me start off by saying these are all great points and questions and I'll do my best to explain them all while adding a little more information to improve your electrical knowledge. You may have learned your electrical training from your family, friends, or a co-worker. Of course, you may not know where they learned it or if they learned the correct and safe installation practices. Even more, do they know where the connections are really supposed to go and why? I understand that even though a light may light when connected incorrectly, one might think it really doesn't make any difference, but you are wrong. I don't want you to be "DEAD" wrong!

Let me explain the color coding for you first. A white terminal connects to the silver- or white-colored terminal, used as a neutral wire. A green or bare wire, usually copper, is used to ground the box on the green screw within the box and is pig-tailed to make a connection to the green ground screw on the device. The "hot" wires, usually black or red, are connected to the brass-colored screws on outlets, but are often connected to both brass- and black-colored terminals screws as either the "hot" or switch leg of the circuit.

As almost always, there are some exceptions to the rule, so just be careful. First, Sometimes a white wire is used as a hot feed or a switch leg, just because that is the only wire available for this installation. Let me explain further.

Let's say we're installing a switch to a light fixture. The power is fed up to the light fixture, meaning we have a "hot", neutral, and ground wire already there. Now, we run a wire, with a black, a white, and a ground to a switch. We use the black wire to connect to the black in the lighting box and also to a terminal on the single-pole switch. We connect the ground wires together in the ceiling box and the ground wire to the switch via the green ground screw.

Next, we use the white wire as a traveler wire to feed the light power. So as not to get confused in the lighting box or put anyone in danger of getting shocked, we simply mark the white wire with a wrap of black tape, signifying that it is being used as a "hot" wire of some sort. Now, simply connect the marked white wire to the unused terminal on the switch, I like the top to be the switch leg, and continue on the ceiling box.

Here at the ceiling box, you'll notice that there is now a white wire from the power feed and a marked white wire from the switch, along with two ground wires. Connect the marked white wire to the black "hot" wire on the fixture (making sure that the power is off first), connect the white wire to the white wire on the fixture for the neutral connection and connect the ground wire to the two ground wire within the ceiling box and add a pigtail ground wire to bond to the ceiling box via a green ground screw. There you have it.

On a three-way switch installation where there are a red, black, white and bare ground wires involved, you'll also see the wire taped to make it a current-carrying wire, usually a traveler. I know this may seem difficult, but it really isn't. By marking the wires, knowing your wire color coding and wiring devices with these methods, you'll be able to remove a device and know hat the wires are being used for. Even more, so will anyone else that takes something apart. There's nothing worse than taking things apart without first investigating where they go and what they do. If the white wire used for a "hot" wire wasn't marked and you haphazardly took the connections apart without investigating, you may connect the "hot" white wire to the neutral white wire accidentally and then "POP"! The circuit breaker trips and then what?

Before I forget, let's talk about cord plugs and their connection to light fixtures. As you may know, most light fixtures have only two wires, a "hot" wire and a neutral wire. Believe it or not, there is a right and wrong way to connect these two wires, even though the light will light either way and here's why. If you ever followed the two wires up to the light socket, you'd see that one connects to the inner bottom contact portion of the light socket, where the bottom of the light bulb makes contact. That is intended for the "hot" connection wire. The other wire is connected to the screw portion of the bulb socket where the bulb screws down into the socket, we'll call this the side of the socket and bulb for visual purposes. Now let's just think about the dangers of hooking the "hot wire to the side connection of the socket. See anything wrong here yet? Now, visualize yourself unscrewing the bulb by grasping around the lower portion of the bulb where the metal screw part of the bulb is exposed.

You unscrew the bulb a bit and then take a second grip of the bulb and "BAM"! You got shocked! It's all because the screw part of the bulb is now the "hot" connection and you became the path to ground. Do you see the danger now? If I never said it before, but I know I have, practice electrical safety every time you touch anything electrical!

So take my advice and treat this information as installation instructions and read them before attempting electrical installations or renovations. The more you read, the more you learn. Safety isn't hard if you follow the safe installation practices I provide for you here, and with your due diligence, you'll be able to do your own electrical installations safely and effectively! Take my advice and do it safely! Before long you will be doing it like a pro.