Electrical wiring is colour coded to identify individual wires. Some areas have all colour codes dictated while others only specify a few colours. It is important for all wiring to follow the same coding so electricians know which wire is which immediately upon inspection.
IEC, AC Color Codes
Most of Europe conforms to the International Electrotechnical Commission's AC branch circuit wiring codes. The protective earth wire is green-yellow. The neutral line is blue. The single phase line is brown. A three-phase line may also be brown, black or grey.
U.S., AC Color Codes
The U.S. National Electrical Code requires only two colours coded for specific duties. White or grey is permissible for the neutral power conductor. Green, bare copper or green with a yellow stripe are required for the protective ground. It is possible for any other colours to represent other duties. Red or black represents a single- or three-phase line. Blue may also represent a three-phase line.
IEC, DC Color Codes
Solar power and computer data centres use DC power. In such circuit branches, a green-yellow wire represents the protective earth. In a two-wire unearthed power system, positive is brown and negative is grey. There are negative and positive two-wire earthed power systems. On a negative earthed circuit, brown is positive and blue is negative. On a positive earthed circuit, blue is positive and grey is negative.
U.S., DC Color Codes
The U.S. National Electric Code mandates the same colours for protected ground and neutral conductor as AC installations. Green, bare copper, or green with a yellow stripe indicate the protected ground. The neutral conductor must be grey or white. In a two-wire ungrounded system, red is positive and black is negative. In a two-wire grounded system, negative grounded positive lines are red and negative grounded negative lines are white. In a two-wire grounded system, positive grounded positive lines are white and positive grounded negative lines are black. In a three-wire grounded system, positive lines are red, mid-wires are white and negative lines are black.