The color of an electrical conductor dictates its function, hazard level, and how it must be terminated. In the US and Canada (NEC), black and red are hot, white and gray are neutral, and bare or green are ground. In Europe and the modern UK (IEC), brown is hot, blue is neutral, and green/yellow is earth. However, relying on color alone without understanding regional standards, code exceptions, and aging insulation is a primary cause of DIY electrical shocks.

The Master Electric Wires Color Codes Reference Table

Use this spec-sheet-table to identify mains wiring based on your region's governing standard. Always verify with a meter before touching any conductor, regardless of its jacket or insulation color.

Function NEC (US / Canada) IEC (EU / UK Post-2004) Old UK (Pre-2004 / BS 7671)
Line / Hot (Single Phase) Black (or Red) Brown Red
Line / Hot (3-Phase L1/L2/L3) Black, Red, Blue Brown, Black, Gray Red, Yellow, Blue
Neutral (Grounded) White or Gray Blue Black
Earth / Ground (PE) Bare, Green, or Green/Yellow Green/Yellow Stripe Green (or Bare)
Switched Hot / Traveler Red, Black, or White (re-identified) Brown, Black, or Gray (sleeved) Red, Yellow, or White
⚠️ SAFETY WARNING: Never assume a wire is dead based on its color. Previous owners or unlicensed handymen frequently misuse white wires as hot legs or wrap black tape over a neutral to use it as a switched return. Always de-energize the panel, lock out the breaker, and verify zero voltage with a tested digital multimeter (DMM) before working on any circuit.

Regional Variants and the "Rows People Get Wrong"

The most dangerous aspect of electric wires color codes is assuming a single standard applies universally. The UK underwent a massive harmonization in 2004 to align with the European IEC 60446 standard (now IEC 60445). If you are working in a UK home built before 2004, a black wire is a neutral. In a post-2004 home, a black wire is a Phase 2 hot. Mixing these up will result in a dead short or a fatal shock.

The Rows People Get Wrong in the NEC

In North America, the National Electrical Code (NFPA 70) has specific exceptions that trip up hobbyists and junior electricians:

  • White Used as a Hot Wire: Under NEC 200.7(C)(2), a white or gray neutral wire can be used as an ungrounded (hot) conductor in a cable assembly (like a 3-way switch loop or a 240V baseboard heater) only if it is permanently re-identified with black tape, paint, or heat shrink at every point where it is visible and accessible. If you see a white wire with black electrical tape wrapped around it, treat it as a lethal hot wire.
  • 3-Way Switch Travelers: In a standard 3-way switch setup using 14/3 or 12/3 NM-B cable, the red and black wires are typically the travelers, and the white is the neutral. However, depending on whether the power enters at the light fixture or the first switch, the white wire might be repurposed as a hot feed or a switched leg. Never trust traveler colors; trace the circuit logic.
  • Blue in Commercial Conduit: While blue is Phase C in 3-phase NEC systems, in commercial conduit pulls (THHN), blue is frequently used as a switched hot or a traveler for multi-way circuits to keep the neutral (white) and hots (black/red) separated.

Safe Interpretation When Markings Are Faded or Missing

If you are working in a home built before the 1960s, you will likely encounter early NM cable, BX/AC armor, or cloth-covered wiring. Over decades, heat and oxidation cause white insulation to turn dark grey or brown, and black insulation to fade into a pale, dusty tan. In these scenarios, electric wires color codes are effectively useless.

The Low-Impedance (LoZ) Testing Protocol

When colors are faded, you must map the circuit using a digital multimeter. Avoid cheap non-contact voltage testers (NCVTs) for final verification, as they are highly susceptible to "phantom voltage" (capacitive coupling from adjacent live wires in the same wall cavity).

  1. Set your DMM to AC Voltage (V~) and, if available, enable the LoZ (Low Impedance) mode. LoZ places a small load on the circuit to bleed off phantom voltages, giving you a true reading.
  2. Identify a Known Ground: Find a bare copper wire in the box, a metallic junction box with a verified ground, or the grounding pin of a nearby live receptacle.
  3. Test Suspect Wire to Ground: A reading of 114V–126V (in a 120V system) indicates a Hot wire. A reading of 0V–2V indicates a Neutral or a disconnected wire.
  4. Test Hot to Suspect Wire: With your red probe on a verified hot wire, touch the black probe to the suspect wire. If you read 0V, the suspect wire is also Hot (same phase). If you read ~120V, the suspect wire is Neutral.

Re-identification: Once mapped, you must legally and safely re-identify the conductors. Do not use cheap, off-brand tape that dries out and falls off in three years. Use 3M Scotch 35 Vinyl Electrical Tape (which comes in specific colors like green for ground, white for neutral) or, preferably, slide adhesive-lined heat shrink tubing over the stripped ends before terminating.

Frequently Asked Questions About Wire Colors

Can I use a green wire for anything other than ground?

No. NEC 250.119 strictly prohibits the use of green, green with yellow stripes, or bare copper for any ungrounded (hot) or grounded (neutral) conductor. If you buy a spool of green THHN wire, it is legally restricted to equipment grounding use only. Using a green wire as a traveler or switched hot is a direct code violation and a massive safety hazard for the next person who opens the panel.

What color is the ground wire in older US homes?

In US homes built before the early 1960s, standard NM cable (like early Romex) often did not include a ground wire at all. You will open the junction box and see only a black and a white wire wrapped in a paper separator and a silver outer jacket. If a ground path exists in these older systems, it is usually provided by the metallic armor of BX/AC cable or a separate bare copper wire run alongside knob-and-tube circuits. If there is no ground, you must either rewire the circuit or install a GFCI receptacle marked "No Equipment Ground" per NEC 406.4(D)(2).

Why does my thermostat wire have 5 different colors?

Low-voltage control wiring (like standard 18/5 thermostat cable) operates under a completely different industry convention and does not follow mains NEC color codes. The standard HVAC control color code is: Red (24VAC Power/R), White (Heat/W), Yellow (Cooling/Y), Green (Fan/G), and Blue (Common/C-wire). Never connect these low-voltage wires to mains voltage, or you will instantly destroy your HVAC control board.

Is a blue wire always neutral?

It depends entirely on your geography. In IEC regions (Europe, UK, Australia), blue is strictly the neutral conductor. However, in the US (NEC), blue is never used for neutral in standard mains wiring; it is reserved for Phase C in 3-phase systems, or used as a traveler/switched leg in commercial conduit runs. If you are importing a European appliance or light fixture to the US, the blue wire must be capped or connected to the white neutral, while the brown wire connects to the black hot.