Wire Color Codes: Simple Electrical Guide

Wire color codes play a vital role in ensuring safe and correct electrical connections. They help distinguish between hot, neutral, and ground wires, which are identified by colors like black, red, blue, yellow, green, and brown. Although the National Electrical Code (NEC) offers guidelines, variations such as using white wires instead of black ones can occur. Wiring mistakes can cause shock hazards , so understanding these color codes and basic electrical circuits is crucial for safety.
Basic Wire Color Code
The home wiring color code is for AC (alternating current). Of course, there are always exceptions to the rule, and there are many legitimate and not-so-legitimate ways to wire devices that don't follow the basic color coding, so never make assumptions based on color coding alone.
Black and Red Wires
A standard electrical circuit usually has a black or red "hot" wire that carries power from the power source to the device (e.g., switch, fixture, outlet, appliance). This hot wire usually connects to a brass-colored screw terminal or black wire lead on electrical devices. Red wires are generally used to hardwire smoke detectors.
White Wires With Red or Black Tape
If you see a white wire with red or black tape, that means it's likely being used as a hot wire. White wires are generally neutral, so pay attention to any tape wrapped around the insulation.
Green and Bare Wires
Green wires connect the device to the home's grounding system . A green wire almost always makes a ground connection—to a ground screw on a device, electrical box, or appliance case or to a green wire lead. A bare wire is a copper wire with no coating. It can function the same as a green wire and is used to make a ground connection.
Blue and Yellow Wires
Blue and yellow wires can be used as hot wires, but they are pulled through a conduit rather than used in outlet wiring. They are most often used for switches.
White and Gray Wires
A white neutral wire carries the power back to the power source. A white neutral wire usually connects to a silver-colored terminal or white wire lead.
Sometimes a white wire is used as a hot wire—not a neutral—in a switch leg, or switch loop, between a switch and a light fixture. To indicate that the white wire is being used as a hot wire, it will be wrapped with a band of black or red electrical tape near both ends. This means the white wire is "coded for hot."
Single-Pole Switch Terminals
Single-pole switches have only two terminals, plus a ground screw. The terminals connect only to the hot wires in a circuit and are interchangeable, so the terminals are the same color. These switches don't typically connect to the neutral, so there is no terminal for the neutral wire.
Three-Way Switch Terminals
Color coding on three-way switches is critical. These switches have two light-colored terminals and one dark-colored terminal, plus a ground screw. The light-colored terminals are the traveler terminals and are interchangeable. The dark-colored terminal is the common terminal, bringing power from the source to the light fixture. As with single-pole switches , neutral wires do not connect to three-way switches. When replacing a three-way switch, the wire connected to the common terminal on the old switch must be connected to the common terminal on the new switch.
Outlet Terminals
Outlets , or receptacles, typically have two brass-colored screw terminals and two silver-colored terminals. The brass terminals are for the hot wires, and the silver terminals are for the neutral wires. If there is only one hot wire and one neutral wire in the electrical box, the hot wire can connect to either brass terminal; and the neutral can connect to either silver terminal. Each terminal pair is connected electrically by a metal connecting tab. You can remove this tab for a special wiring configuration called split-wiring.
Lamp Cord Wiring
Most lamp cords have only two wires—a hot wire and a neutral wire. If you look closely at the cord, one half has slight ridges on the cord insulation, while the other half is smooth. The ridged half is the neutral wire. The hot wire (smooth insulation) should connect to the brass-colored terminal on the light socket; this is connected to a little metal tab inside the socket, which delivers power to the light bulb. The neutral wire (rigid insulation) should connect to the silver-colored terminal, which is joined to the threaded metal sleeve of the bulb socket where the light bulb screws in.
Frequently Asked Questions
Is it OK to connect red and black wires together?
Yes, you can connect red and black wires or two red wires. They are both considered "hot" wires.
What wire color is the live wire?
Brown is considered a live wire. Before you begin any work, ensure no power source is connected to the live wire.
What happens if you switch black and white wires?
It's important not to switch the black and white wires as you could trip the breaker and start a fire.
Source: https://www.thespruce.com/color-coding-of-electric-wires-1152300