Color coding for wires is the standardized system of insulating electrical conductors in specific colors to instantly identify their voltage potential and circuit function. In a real installation, correct color coding changes a hazardous, untraceable spaghetti mess into a safe, instantly diagnosable system that passes AHJ (Authority Having Jurisdiction) inspection and prevents lethal cross-wiring during future repairs. People most commonly confuse US residential AC branch circuit colors (Black/White/Bare) with DC solar/battery colors (Red/Black) or 3-phase commercial colors (Brown/Orange/Yellow), leading to dangerous miswiring when transitioning between sub-systems or working on hybrid off-grid setups.
The Core AC Branch Circuit Colors (US Residential 120V/240V)
For standard US single-phase residential wiring, the National Electrical Code (NEC) strictly dictates the colors for grounded and grounding conductors, while leaving ungrounded (hot) conductors more flexible but conventionally standardized.
- Black (Hot/Ungrounded): The primary current-carrying conductor. It brings 120V from the breaker to the device. Think of the hot wire as the supply lane, the neutral as the return lane, and the ground as the emergency shoulder that only sees traffic during a crash.
- Red or Blue (Hot 2/Ungrounded): Used for the second 120V leg in 240V circuits, multi-wire branch circuits (MWBC), or travelers in 3-way/4-way switch setups.
- White or Gray (Neutral/Grounded): The return path for current. NEC Article 200 strictly mandates that the grounded neutral conductor must be white or gray. You cannot use a white wire as a hot conductor unless it is permanently re-identified with black tape or paint at both ends.
- Bare Copper or Green (Equipment Ground): The safety path. NEC Article 250 requires this to be bare, green, or green with a yellow stripe. It carries zero current under normal operation and only conducts during a fault to trip the breaker.
Worked Numeric Example: Wiring a 240V 30A Dryer Receptacle
Let's look at a real-world scenario: wiring a NEMA 14-30R receptacle for an electric dryer. This requires a 120/240V split-phase circuit, meaning we need two hot legs, a neutral (for the dryer's 120V control board and drum motor), and a ground.
Here is exactly how the colors map to the NEMA 14-30R terminals:
| Terminal Label | Function | Wire Color (10/3 NM-B) | NEC Rule / Note |
|---|---|---|---|
| X (Left Hot) | 120V Leg 1 | Black | Connects to left brass slot |
| Y (Right Hot) | 120V Leg 2 | Red | Connects to right brass slot |
| W (Neutral) | Return Path | White | Connects to center silver L-shaped slot |
| G (Ground) | Safety Fault Path | Bare Copper | Connects to bottom U-shaped pin and metal box |
The Math: A 30A circuit requires wire rated for at least 30 amps. While 10 AWG THHN wire in conduit is rated for 40A in the 90°C column, NEC 334.80 restricts NM-B (Romex) cable ampacity to the 60°C column. In the 60°C column, 10 AWG copper is rated for exactly 30A, making it the perfect, code-compliant fit for this 30A breaker.
Where You Meet This in Practice
You will run into color coding edge cases most frequently in two specific residential scenarios:
1. Modern Switch Loops (NEC 2011 and Newer)
Prior to the 2011 NEC update (Article 404.2(C)), switch loops were wired using 2-conductor cable (Black and White). The white wire was sent up to the switch as a permanent hot, and the black wire returned as the switched hot. This meant the neutral was missing at the switch box. Modern code requires a neutral at every switch box to accommodate smart switches and timers. Today, you must pull 14/3 or 12/3 NM-B (Black, Red, White, Bare). The white stays capped in the back of the box as the required neutral, the black is the line-in hot, and the red is the switched-hot return.
2. Multi-Wire Branch Circuits (MWBC)
An MWBC uses a 3-wire cable (Black, Red, White, Bare) to feed two separate 120V circuits that share a single neutral (White). The black and red wires must be connected to a double-pole breaker or handle-tied single-pole breakers on opposite phases (A and B). If you put them on the same phase, the shared white neutral will carry the sum of both currents instead of the difference, overloading the neutral and creating a fire hazard.
Decision Path: Which Wire Colors to Pull
Use this decision tree to select the exact cable and color configuration for your next rough-in.
| If your project is... | Then pull this exact cable... | Color Mapping |
|---|---|---|
| Standard 120V 15A or 20A branch circuit (outlets, lights) | 14/2 or 12/2 NM-B | Black (Hot), White (Neutral), Bare (Ground) |
| Smart switch requiring a neutral at the box | 14/3 or 12/3 NM-B | Black (Line), Red (Load), White (Neutral), Bare (Ground) |
| 240V straight (no 120V needed), e.g., baseboard heater 20A | 12/2 NM-B | Black (Hot 1), White taped Black (Hot 2), Bare (Ground) |
| 120/240V 50A range or EV charger | 6/3 NM-B or 6 AWG THHN in conduit | Black (Hot 1), Red (Hot 2), White (Neutral), Bare/Green (Ground) |
| 12V/24V/48V DC solar array or LiFePO4 battery bank | THHN in conduit or PV wire | Red (Positive), Black (Negative) |
DC vs. AC: The Most Dangerous Mix-Up
The most frequent cause of catastrophic failure in DIY off-grid solar and battery builds is applying AC color logic to DC circuits, or vice versa.
Furthermore, never parallel mismatched DC cells or wire a DC system without a properly rated BMS (Battery Management System) and DC-rated breakers. DC arcs do not cross zero like AC arcs, meaning a standard AC breaker will fail to extinguish a DC fault, leading to melted terminals and fires.
FAQ: Edge Cases and Code Exceptions
Can I use a white wire as a hot conductor?
Yes, but only under NEC 200.7(C). You must permanently re-identify the white wire at both ends and at every accessible junction point using black electrical tape, heat shrink, or paint. This is incredibly common in switch loops and 240V-only appliance circuits (like a pure 240V baseboard heater) where the white wire in a 12/2 cable is used as the second hot leg.
What are the colors for 277V/480V 3-phase commercial wiring?
If you step outside residential single-phase into commercial 3-phase, the colors change entirely to prevent 120V devices from being accidentally wired to 277V. According to industry standards and NEC 215.12, the hots are Brown (Phase A), Orange (Phase B), and Yellow (Phase C). The neutral is Gray (not white), and the ground remains Green or Bare. The high-leg delta (often found in older 240V 3-phase panels) uses Orange exclusively for the 208V high leg.
Does the ground wire have to be bare copper?
No. While bare copper is standard in NM-B residential cable, THHN wire pulled in conduit for commercial or subpanel feeders often uses Green or Green-with-a-Yellow-Stripe insulation for the equipment grounding conductor. Both are fully code-compliant.
Default Recommendation
For any US residential AC branch circuit or feeder, default strictly to standard pre-manufactured NM-B cable colors (Black for hot, Red for secondary hot, White for neutral, Bare for ground). Buy the exact 2-conductor or 3-conductor cable dictated by the decision table above rather than attempting to pull individual colored THHN wires through residential studs. Never rely on color alone to assume a wire is dead; always verify with a CAT III/IV rated multimeter before making terminations.






