What do electrical wire color codes mean?
All electrical wires are made according to standard color codes that identify each wire's function in a circuit. Knowing which wire does what is imperative not only in the correct configuration of an electrical system, but it's also paramount for your safety.
Black is used for power in all circuits. Any circuit's black wire should be considered hot or live. Black wire is never used for a ground or neutral wire and should be used as the power feed for a switch or an outlet. A black wire is often used in a circuit as a switch leg, the connection that runs from the switch to the electrical load.
Red indicates the secondary live wires in a 220-volt circuit, used in some types of switch legs and in the interconnection between smoke detectors that are hard-wired into the power system. You can connect a red wire to another red wire or to a black wire.
Blue and yellow
Yellow and blue are also used to carry power but are not for wiring the outlets for common plug-in electrical devices. These colors are used for the live wire pulled through conduit. You'll use yellow mainly as switch legs to fans, structural lights and switched outlets. You'll use blue mainly as a traveler for a three-way or four-way switch.
White and gray
White and gray indicate a neutral wire. White is the color most often used for this function. A neutral wire connects to the neutral bus bar within an electric panel. (A bus bar is made of conductive metal that attracts the electric current for distribution outward to feeders.) You can connect white and gray only to other white and gray wires.
Green indicates the grounding of an electric circuit. A green wire can connect only to another green wire and should never connect to any other color wire. Green wires connect to the grounding terminal in an outlet box and run from the outlet box to the ground bus bar within an electric panel. The purpose of the green wire is to provide a path to ground for a circuit's electric current if a live wire within the circuit happens to touch metal or some other conductive material.
If you're apprehensive about dealing with electrical wires in your home, search Angie’s List for top-rated electricians in your area. For example, you'll find more than 8,000 Los Angeles-area electricians, but just over 900 are highly rated.
Angie's List member Jim Kelly recently hired highly rated Johnson Electric of Los Angeles to repair shorted exterior lights, which required running new wiring through his home. “[Johnson Electric] came on the agreed-upon date and ran the new underground conduit and wired up and installed new fixtures with dusk-to-dawn sensors,” he says. “That night we had light. It was a job well done, on time and on budget.”