Electrical wire colors probably don’t mean anything to the average homeowner, but those distinctions are actually very important and knowing the proper color coding is essential when performing electrical work. Each color serves a different purpose and you should be aware that all wires, no matter their function or color, can carry a current at some point so they should be handled carefully.
In 1881, the New York Board of Fire Underwriters issued the first set of safety guidelines for electrical wiring. In 1893 the first National Code of Rules for Wiring Buildings for Electric Light and Power was created and in 1897 the NBFU produced the first National Electrical Code but colors weren’t addressed. Wire color codes were finally mentioned in the 1928 edition of the NEC.
*The basic guidelines below apply to electrical wiring in the United States, though there are a few exceptions, so calling a certified electrician is your safest option.*
Green, green with a yellow stripe, or bare copper
These are ground wires that keep you, your appliances, and your home safe from electrical fires. Their purpose is to provide a path for a circuit’s electrical current if a device shorts out or trips a breaker.
Black
Black indicates a hot or live wire that’s carrying a current and is used for power in all circuits. These wires feed an outlet or switch and are often used as switch legs (the connection that runs from the switch to the electrical load).
Red
This will be your second hot wire when doing a 220-volt installation for large appliances such as a stove, clothes dryer, or air conditioner. Red can also be the interconnecting electrical wire between two hardwired smoke detectors.
Blue & Yellow
These two colors are hot wires usually pulled in conduit for common plug-in electrical devices. Blue wires are used as travelers, usually on three- or four-way switches (controlling a light from multiple locations) or as switch legs for things such as fans or lights. Yellow wires are almost always used as switch legs for outlets, fans, or lights.
White or Gray
White or gray indicates a neutral wire, which provides the return path for the current carried by the hot wires and is grounded within the electrical panel.