What I am wondering is if there is any code that is violated if the wrong colors are used in wiring outlets? For example, it is standard to use white as neutral and black as power but if I only had two blacks or some other color combination, does this violate any codes in the state of Michigan?

A follow up question which is what made me wonder this... I currently have a light in a closet that has a pull chain for the switch. I want to install a switch outside the closet that will control the light fixture instead (with a new light fixture that won't use a pull chain). The existing power is of course ran to the light. Is it perfectly legit to simply use a single 14/2 or 14/3 wire (in one conduit), running the white and black to the switch, one for return and one for going? I know many outlets use black and black going to the switch so is it a big deal to use black and white instead? Does it violate any codes in Michigan?


Electricity doesn't care about color. But electricians (both pros and amateurs) do.

The color is meant to inform both you and any future worker which wires are hot (usually black or red, but occasionally other colors, such as blue), neutral (white or sometimes grey), ground (bare, green or green/yellow striped). If it is not bare, white or green, it is potentially hot.

Code lets you use wire with a different color insulation than the standard if you mark it permanently with the correct color, such as a piece of colored electrical tape, heat shrink tubing or with paint. That way, when you return to the fixture/switch/outlet three years from now, even if you cannot remember what you did, the color of the wires will guide you. And for someone else working on your circuit, it is essential.

Code in all states that I know of in the US require correctly marked wire (either the original jacket or a subsequent marking). Wrong color is a violation. I do not specifically know Michigan code (and it probably varies by local jurisdiction), but it almost certainly follows the standard code when it comes to wiring colors.

On your followup question, it was very common to use 14/2 or 12/2 wire to run a switch loop (a hot line to the switch and a switched hot returning from the switch). The code required that the white wire be marked black (or red) to show it was hot.

Code now requires that all new switches have a neutral, so the old two wire switch loop is not allowed, even if you are using a dumb switch that doesn't need a neutral (some future switch might). So if you are running a new wire, you might as well use 14/3, use the black and red for the switch and leave the white capped in the switch box. You should attach the white at the fixture so that in any subsequent wiring project it will already be properly connected.

  • So can you use various colors for ground and neutral as long as they are marked on the ends with green and white, or does that rule only work for hots (black)? – JPhi1618 Nov 30 '15 at 21:36
  • I was actually using 14/3 so the grounding will be fine. I just said 14/2 to make the question simpler. Thank you for the feedback! – Eric F Nov 30 '15 at 21:40
  • @JPhi1618 I believe all the colors can be changed except the green. There also was a restriction on which wire in a switch loop should be constantly hot (the feed), but that is now superseded by the neutral at switch requirement. Also, I don't think you are allowed to substitute in a raceway when you are using single wires instead of a bundled cable. – bib Nov 30 '15 at 22:00
  • 4
    @JPhi1618 Neutral must be white, gray, or one of the other limited color combinations. Grounding must be green, green and yellow, or bare. Any color other than that can be used as ungrounded (hot) (black, red, blue, pink, purple, etc.). Grounded (neutral) wires can be used as ungrounded (hot) conductors, but only if they are marked at both ends. Grounding conductors can only be used as grounding conductors. – Tester101 Nov 30 '15 at 22:52
  • 2
    Probably worth noting that, when running a switch loop, it's always done so that the (normally) white wire is the feed to the switch and the black returns. This leaves you with a white neutral and black switched-power to connect to the lighting device. – J... Dec 1 '15 at 18:36

"Switch Loop" is what you're asking about and very common. Mark the white wire with black tape to indicate it's a loop. No codes violated.

If that's all you're asking about, then by all means do it. But please don't get creative and use a green wire for hot, blue for neutral and red for ground or something crazy like that.

If you search this site for switch loop there are tons of examples.

  • Yep that is all I am asking to do. I know that it is bad practice to use other colors too and very unsafe but does that actually violate a code at all? – Eric F Nov 30 '15 at 21:26
  • 1
    Outside of a switch loop and three-way switches, I'm not sure if using completely off the wall colors violates code. I'd like to know if it does. I think green, white, and black might be codified, just not sure where. "Bare" is obviously only for ground, but not a color either... – JPhi1618 Nov 30 '15 at 21:27
  • I don't think so either but that is why I made the post out of curiosity. – Eric F Nov 30 '15 at 21:29
  • 3
    Switch loop as described is no longer code compliant. Might as well run that extra conductor, you might use it! – batsplatsterson Nov 30 '15 at 21:40
  • 1
    Remember that if neutral doesn't resch the switch box, you can basically forget ever using a smart switch in that location. – keshlam Nov 30 '15 at 22:18

To summarize what the NEC itself requires on this topic:

  • The neutral (grounded conductor) must be white, gray, some non-green color with three white stripes, or white with some non-green stripe (this isn't listed in the NEC, but is technically allowed as it's how the second neutral in an x/2/2 cable is configured). Certain cables where colored insulation can't be used or doesn't make sense can use indelible markings at terminations (usually white) or a ridge along the neutral side of the cable (typically seen on flat cords).
  • The ground (equipment grounding conductor) must be bare, green, or green with yellow stripes.
  • The white wire in a NM cable can be retagged to be a hot wire using indelible and distinct markings at both ends (not white, grey, or green, of course). Historically, this provision has been used when running switch loops, but is no longer needed in most cases due to the new requirements for neutrals in switch boxes.
  • Orange wires (or equivalent markings at the ends of wires) in service entrances are reserved for the "wild" or "high" leg in 120/208/240V high leg delta services. This is done so that this leg is not mistaken for a 120V leg with potentially device-frying results. (This is 230.56 in the Code for those who aren't aware.)

Hots, switched hots, and class I control wiring can be any color that isn't reserved above, by Code. Black/red/blue is the common convention in 120/240 split and 120/208Y circuits -- x/2 through x/4 NM obeys this. Brown/orange/yellow is seen where 277/480Y is present in high-rise, commercial, and industrial occupancies.

DC branch circuits (these exist in places!) introduce one other kink:

  • Positive ungrounded DC conductors must be red, red striped, or tagged positive, while their negative counterparts must be black, black striped, or tagged negative.

Short answer, the NEC does require identification by color coding or other means. The specifics depend on the size of the wire, and there are different rules for hots, neutrals, and grounds.

The practice you describe, running a wire to use as a switch loop, is perfectly acceptable, safe, and code compliant in the past. You would mark the white with black or red tape in the box at both ends to indicate it was used as switched hot rather than the usual neutral.

The current version of the NEC requires you to run a neutral as well to that new switch. Can't say what version of the NEC your locale is following, but it doesn't really matter, you'd be foolish not to run a neutral to a switch these days. Lots of smart switches require it, and if you ever want to extend the circuit from that switch, you'll need that neutral.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.