Residential electrical wire codes are the standardized color-coding system applied to conductor insulation to instantly identify a wire's function and voltage potential within a circuit. This coding dictates exactly where a wire terminates—such as brass versus silver screws on a receptacle—and fundamentally changes how safely you can troubleshoot, splice, or expand a circuit later. When you open a panel or a junction box, these colors are your first line of defense against arc faults and lethal shock.
The most common mistake DIYers make is confusing the cable jacket color with the individual conductor insulation color. A yellow NM-B jacket tells you the cable contains 12 AWG wires, but it’s the black, white, and bare wires inside that actually follow the functional electrical wire codes residential inspectors look for. A secondary, highly dangerous confusion is assuming every white wire is a neutral; in switch loops and 240V circuits, white wires frequently carry lethal line voltage and must be treated as ungrounded (hot) conductors.
The Core Standard: US Residential Wire Color Codes
In the United States, the National Electrical Code (NEC) strictly governs the identification of grounded (neutral) and equipment grounding conductors, while leaving ungrounded (hot) conductors to regional conventions that have become standardized industry practice. According to NFPA 70 (NEC) Article 200, the grounded neutral must be white or gray, and the equipment ground must be bare, green, or green with a yellow stripe. Ungrounded hots can be any color except white, gray, or green.
| Insulation Color | NEC Function | Termination Point | Voltage Potential |
|---|---|---|---|
| Black | Ungrounded (Hot) | Brass screws, Breaker terminals | 120V to ground |
| Red | Ungrounded (Hot / Traveler) | Brass screws, Breaker terminals | 120V to ground |
| Blue / Yellow | Ungrounded (Hot / 277V) | Brass screws, Breaker terminals | 120V or 277V to ground |
| White | Grounded (Neutral) | Silver screws, Neutral bus bar | 0V to ground (under normal load) |
| Gray | Grounded (Neutral) | Silver screws, Neutral bus bar | 0V to ground |
| Bare / Green | Equipment Grounding | Green screws, Ground bus bar | 0V (carries fault current only) |
Where You Meet This In Practice: The "White Wire" Trap
The theory of wire colors breaks down the moment you run a standard 2-conductor cable to a 240V load or a 3-way switch. This is where re-identification becomes a critical code requirement under NEC 200.7(C).
You are wiring a 2,000W, 240V baseboard heater. The current draw is 8.3A (2000W / 240V). NEC Article 210.19 requires continuous loads to be sized at 125%, bringing the minimum circuit ampacity to 10.4A. Best practice dictates upsizing to 12/2 NM-B cable and a 20A breaker to minimize voltage drop. Inside the yellow 12/2 jacket, you have a black wire, a white wire, and a bare ground. You connect the black to the breaker's Line 1 terminal, and the white to the breaker's Line 2 terminal. Because the white wire is now carrying 120V to ground, you must wrap both ends in black vinyl tape. If you skip this and land the white wire on the panel's neutral bar, you create a dead short the moment the breaker is switched on, resulting in a violent arc flash.
This exact scenario is where Electrical Safety Foundation International (ESFI) data shows a high percentage of DIY electrical fires originate. The white wire is physically identical to the neutral wire, but functionally, it is now an ungrounded hot conductor. Re-identifying it with permanent black or red electrical tape (like 3M Super 33+) at every termination point—both at the panel and at the thermostat—alerts the next electrician that this conductor is live.
Decision Tree: Selecting and Re-Identifying Conductors
When pulling wire, use this decision path to determine exactly how to treat the white conductor in your cable. This eliminates guesswork and ensures NEC compliance.
| If Your Circuit Is... | Then Your White Wire Is... | Required Action & Concrete Pick |
|---|---|---|
| 120V Standard Receptacle or Lighting | Grounded Neutral | Do nothing. Land directly on the silver terminal screw or panel neutral bar. |
| 240V Resistive Load (Heater, Pump) | Ungrounded Hot (Line 2) | Re-identify. Wrap in black 3M Super 33+ vinyl tape at both ends. Land on the second breaker pole. |
| 3-Way or 4-Way Switch Loop | Switched Hot or Traveler | Re-identify. Wrap in black or red tape at both ends. Land on brass switch terminals. Never use as a neutral. |
| 120/240V Subpanel Feeder (4-wire) | Grounded Neutral | Do nothing to the wire. Land on the isolated neutral bus bar in the subpanel. Ensure the green bonding screw is removed. |
| Smart Switch requiring Neutral | Grounded Neutral | Verify first. Test with a multimeter (expect <1V to ground). If it reads 120V, it is a switch leg, not a neutral. Pull new 14/3 or 12/3 cable. |
NM-B vs. THHN: Jacket Colors vs. Conductor Colors
A major point of confusion when buying materials at the hardware store is the difference between the outer jacket color of non-metallic (NM-B) cable and the insulation color of individual THHN wires pulled through conduit.
Decoding NM-B (Romex) Jacket Colors
For NM-B cable, the outer jacket color does not indicate the function of the wires inside. Instead, it indicates the American Wire Gauge (AWG) size of the conductors. This is a manufacturer convention adopted to help inspectors quickly verify wire sizing on the jobsite.
- White Jacket: 14 AWG (15 Amp max breaker)
- Yellow Jacket: 12 AWG (20 Amp max breaker)
- Orange Jacket: 10 AWG (30 Amp max breaker)
- Black Jacket: 8 AWG or 6 AWG (40A to 55A+ breakers)
Inside a yellow 12/2 NM-B cable, you will still find the standard black (hot), white (neutral), and bare (ground) conductors. The yellow jacket is purely for gauge identification.
THHN in Conduit
When you pull individual THHN/THWN-2 wires through EMT or PVC conduit, there is no outer jacket. Here, the insulation color is the only identifier. You must buy specific colors from the spool. For a standard 120V, 20A conduit run, you must pull one black (hot), one white (neutral), and one green or bare (ground). If you are pulling a 3-way switch circuit in conduit, you must pull a red wire for the traveler, rather than relying on a white wire wrapped in tape, as NEC 210.5 prefers distinct colors for travelers where available.
Frequently Asked Questions About Residential Wire Codes
Can I use a gray wire instead of white for a neutral?
Yes. NEC Article 200.2 explicitly permits white or gray for grounded neutral conductors. In commercial and industrial settings, gray is often used for 277V neutrals to distinguish them from 120V white neutrals, but in residential work, gray is perfectly legal and code-compliant for any standard neutral application, provided it is consistently identified throughout the system.
What if I run out of black tape to re-identify a white wire?
You cannot substitute masking tape, duct tape, or paint. NEC 200.7 requires the re-identification to be permanent and of a color other than white, gray, or green. If you do not have vinyl electrical tape, you can use a permanent black or red marker to completely color the visible insulation at the termination point, though high-quality vinyl tape (like 3M Super 33+) is the industry standard and will not peel off over time due to thermal cycling in the panel.
Are residential wire color codes the same in Europe or the UK?
No. The US follows the NEC (black/red/blue for hots, white/gray for neutral, green/bare for ground). The UK and Europe follow IEC 60446 standards, which use brown, black, and gray for line conductors, blue for the neutral, and green-and-yellow striped insulation for the protective earth. Never apply US color code logic to imported appliances or when working on international properties.






