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?


5 Answers 5


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
    Commented Nov 30, 2015 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
    Commented Nov 30, 2015 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
    Commented Nov 30, 2015 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
    Commented Nov 30, 2015 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...
    Commented Dec 1, 2015 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
    Commented Nov 30, 2015 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
    Commented Nov 30, 2015 at 21:27
  • I don't think so either but that is why I made the post out of curiosity.
    – Eric F
    Commented Nov 30, 2015 at 21:29
  • 4
    Switch loop as described is no longer code compliant. Might as well run that extra conductor, you might use it! Commented Nov 30, 2015 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
    Commented Nov 30, 2015 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.


You're talking about conduit. And when you say 14/2 "wire", that is actually cable and use of cable inside conduit is almost disallowed. You can put 1 cable (and nothing else) inside a conduit if there is ample room, and that is it. These "stifling limitations" make it foolhardy.

When using individual wires (which is what you typically do inside conduit, e.g. THHN), remarking is not allowed. (in branch circuit wiring <=6 AWG). You're expected to have the correct color of wire on the truck. If you are running a switch loop (again: with individual wires),

  • the always-hot wire must be black, brown, red, orange, yellow, pink, blue or purple.
  • the switched-hot wire must be black, brown, red, orange, yellow, pink, blue or purple.

No exceptions.

However, if for some reason you are putting cable inside conduit, then since it's cable, you can re-mar--- Hold on. This just in. Yes, Michigan did adopt NEC 2011. Thanks to that, switch loops must contain neutral, or space for it. That means if you are wiring a switch loop in cable, you must use /3 cable, the white wire is reserved for actual neutral (black and red are as above), and therefore you cannot re-mark it to be a hot, since it's reserved for neutral.

If you're in conduit with individual wires, you don't have to physically install the neutral wire, but you must leave room for it in box fill, conduit fill, conduit ampacity derate, etc. etc.

If you're in conduit with cable, remember the "stifling limitations" I mentioned earlier? That means it is totally impractical to leave room for the neutral wire. Therefore you must provision it in your cable.

  • Thanks for the answer. I do love reading your answers always and learning. So for me to understand, when using the 14/3 for a switchback, I would leave the colors as is (black and white) connecting them both to the switch and then grounding it as well
    – Eric F
    Commented Apr 25, 2019 at 14:46
  • 2
    @EricF If you're using 14/**3** (as opposed to an old grandfathered 14/**2**) then you use black & red for hot & switched hot - i.e., for the 2 main wires to the switch - and the white is capped as neutral for future use (e.g., smart switch, motion sensor, etc.). Commented Apr 25, 2019 at 15:02
  • 1
    @EricF manassehkatz is correct. White is reserved for future use as neutral. White is never an allowable color code for a hot in a switch loop. When you are in situations where neutral is not needed (pre-2011-wired switch loops; or 240V circuits e.g. air conditioner), you cannot use the white wire for non-neutral, you must mark it with tape or paint and then it is no longer white. Commented Apr 25, 2019 at 15:12
  • 1
    @manassehkatz Makes sense! Thanks for the clarification!
    – Eric F
    Commented Apr 25, 2019 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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