The established colors for electrical wires serve two purposes which include identifying wire functions and enhancing safety during installation and repair work. Basic wiring knowledge enables people to operate safely without needing professional electrician skills.
Black Wires Carry Power

The black wire functions as a hot wire. The black wire transmits electrical power from its source to both outlets and switches and appliances. The wire creates a dangerous situation because it needs to be handled with protective measures.
Red Wires Are Also Hot

Red wires serve as secondary hot wires. Smoke detectors use these devices during switch wiring and multi-way switch installations. These wires which handle electrical current become dangerous like black wires do.
White Wires Are Neutral

White wires return electricity back to the power source. The wires complete the electrical circuit. The wires function as safer alternatives to hot wires because they still transmit electrical current which requires safe handling.
Green or Bare Wires Are Ground

Green or bare copper wires serve as grounding wires. The wires create a secure pathway for fault electrical currents to follow. Grounding systems protect devices and people from electrical shocks.
Blue and Yellow Wires Are Used in Special Circuits

The blue and yellow wires function as traveler wires for switch systems and control wiring applications. The wires used in home electrical systems depend on specific power requirements which determine their energy output.
Gray Wires Are Alternate Neutrals

Some electrical systems use gray wires for the same purpose which white wires serve. Neutral conductors function as gray wires when white wiring exists or when local codes require their use.
Colors Can Vary by Country

Countries across the world maintain different wire color standards. The United States uses standards which this guide presents. Local electrical codes must be verified before starting any electrical work.
Old Homes May Not Follow Modern Codes

Older buildings may use faded colors or outdated systems. Never assume based on color alone. Testing wires before touching is always safer.
Testing Matters More

Wire color gives guidance, not certainty. Tools like voltage testers confirm whether a wire is live. The combination of color and testing provides the safest method.