
The color is usually on the insulation, and it helps people tell wires apart after they disappear into a cable or box. In U.S. building wiring, white or gray often identifies a grounded circuit conductor such as a neutral. Green or bare wire is commonly used for equipment grounding.
Why are there several colors for the other wires?
A cable can contain more than one conductor carrying voltage from the supply. Different colors or other markings help people follow the right conductor through the system. The colors can also help tell phases apart in a larger installation.
Does the color prove what the wire does?
Conventions vary by country and by the kind of circuit. Some installations use markings that change how a conductor is identified. The color is a clue to what the installer intended and needs to be confirmed against the actual circuit.
For more on how household circuits are put together, see Basics of Electric Utilities 101.