
Electrical Wire Color Code Chart for US Wiring
In US home wiring, black and red wires carry power, white or gray wires carry the neutral return, and green or bare copper wires provide the ground path. Knowing this color code lets you read a panel, a switch box, or an outlet without guessing which wire does what.
Wire color is not decoration. It is a safety system built into the National Electrical Code (NEC) so that anyone opening a junction box, whether a homeowner or a licensed electrician, can identify a wire’s job before touching it. Mixing this up is one of the more common causes of shock and short-circuit incidents in residential wiring.
This guide breaks down each standard wire color, what it does, where you will find it, and the mistakes that trip up even confident DIYers.
Why Wire Colors Matter
Every wire in a circuit has a job: carrying power in, carrying power back out, or carrying fault current safely to ground. Color coding lets an electrician trace that job at a glance instead of testing every wire with a meter.
This matters most during troubleshooting. If a ceiling fan stops working or an outlet trips a breaker, color coding narrows down which wire to check first. It also matters for safety. Touching a black wire in a live circuit is very different from touching a bare ground wire, and the color tells you which situation you are in before you make contact.
Local codes can vary slightly, but the core NEC color scheme is consistent across nearly all US residential wiring built after the 1960s. Older homes may still have outdated color schemes or aluminum wiring, which is one more reason to verify before working on anything.
Black Wires: The Hot Wire
Black is the standard color for a hot wire, meaning it carries live current from the breaker panel to an outlet, switch, or fixture. In a simple single-circuit setup, the black wire is the one to treat as always energized unless you have confirmed the breaker is off with a voltage tester.
Black wires show up everywhere: in outlet boxes, light fixture boxes, and switch loops. In a standard three-wire cable (black, white, bare copper), the black wire is doing the actual work of delivering power.
In more complex setups, you may see black used for multiple hot legs in a multi-wire branch circuit. When that happens, electricians often add a second color, usually red, to separate the two hot conductors so they are not confused during installation or repair.
Red Wires: Secondary Hot Wire
Red wires are also hot, but they typically indicate a second hot conductor in the same run. You will see red wires in a few common situations: a switched outlet where only half the outlet is controlled by a wall switch, a 240-volt appliance circuit, or a multi-wire branch circuit feeding two separate circuits from one cable.
Red is also used as a traveler wire in three-way and four-way switch setups, where two switches control one light from different locations. In that context, the red wire carries a signal between switches rather than delivering constant power, but it should still be treated as live any time the circuit is on.

Because red always means hot, never connect a red wire to a neutral or ground terminal. Doing so can energize a part of the circuit that is supposed to be safe to touch.
Blue and Yellow Wires: Switch Legs and Travelers
Blue and yellow wires show up less often in basic residential circuits, but they are common in three-way and four-way switch wiring and in conduit-run commercial-style installations. Blue wires typically serve as traveler wires between switches, similar to how red is sometimes used, while yellow wires often mark switch legs that control a specific fixture.
These colors matter most in homes with multiple light switches controlling one fixture, like a staircase light operated from both the top and bottom floor. If you open a switch box and see blue or yellow wires alongside black and red, do not assume they are neutral or ground. Treat them as hot until confirmed otherwise with a tester.
White and Gray Wires: The Neutral
White and gray wires carry the neutral return path, completing the circuit by carrying current back to the panel after it has passed through a light, outlet, or appliance. Under normal operation, a neutral wire is not supposed to be energized, but it can still carry current and should never be assumed safe to touch without testing.
One important exception: in some switch loops, a white wire is repurposed to act as a hot wire instead of a neutral. When this happens, code requires the white wire to be marked with black or red tape or a permanent marker at both visible ends, signaling that it is not functioning as a standard neutral. If you see a white wire with black tape wrapped around it, treat it as hot.
Gray is less common in US residential wiring but appears in some conduit systems and multi-circuit installations as an alternate neutral color, particularly in Canada-influenced or older mixed wiring.
Green and Bare Copper Wires: Grounding
Green insulated wires and bare copper wires both serve as the ground, providing a safe path for fault current to travel back to the panel and trip the breaker if something goes wrong. This is the wire that protects you if a hot wire ever touches a metal box, appliance casing, or fixture.
Ground wires are not supposed to carry current under normal conditions. They only activate during a fault, which is exactly why they are the safest wire to touch under normal circumstances, though caution is still warranted any time you are working inside a live panel.

In most residential wiring, the ground connects to a green screw on outlets and switches, to the metal box itself if it is metal, and eventually back to a grounding bar in the main panel. Bare copper and green wires can be connected to the same grounding points without any adapter.
Common Wire Color Mistakes to Avoid
A few mistakes come up again and again in DIY wiring projects. Assuming a white wire is always neutral is one of them, since a repurposed white hot wire without tape is a common code violation left behind by previous owners or unlicensed work.
Another frequent error is connecting wires by color alone without testing them first, especially in older homes where a previous renovation may not have followed standard color coding at all. Wire nuts holding mismatched colors together, unmarked hot neutrals, or ground wires spliced into hot circuits are all signs of past work that needs correcting.
Reusing wire colors incorrectly during a new installation is also a problem. Using a white wire as a new hot conductor without taping it, or using green wire for anything other than ground, creates confusion for the next person who opens that box, which could be a future electrician or the homeowner themselves.
National Electrical Code and Wire Color Rules
The NEC sets baseline rules for wire color in residential and commercial wiring, and most US states adopt NEC standards with only minor local amendments. Grounding conductors must be green, green with a yellow stripe, or bare copper under NEC guidelines, and neutral conductors must be white or gray.
Hot wires do not have as strict a color requirement under the NEC itself, which is why black, red, blue, and yellow are all used depending on the circuit’s role rather than a single mandated color. Some states and municipalities add their own amendments on top of the NEC, so checking local code before starting electrical work is worth the extra step, particularly for anything involving a permit or inspection.
When to Call a Licensed Electrician
Understanding wire color code is useful for reading a panel, diagnosing a problem, or double-checking a previous owner’s work, but it is not a substitute for licensed electrical work on anything beyond basic fixture or outlet swaps. Panel work, new circuit installation, and anything involving a permit should go to a licensed electrician in most US jurisdictions.

If you open a box and find wiring that does not match standard color code, unmarked wires, aluminum wiring, or signs of old cloth-insulated wiring, that is a strong signal to bring in a professional rather than guess. The cost of a licensed inspection is small compared to the risk of a wiring fire or shock injury from a misidentified wire.