Wire Colour Codes: Mains, DC, Ethernet, USB and More

Find the cable or connector you are working with and match each wire colour to its function. Colours are conventions that vary by country and age of the installation, so confirm with a meter before connecting anything.

AC mains: single phase

Conductor colours for single-phase supplies in common use.

Standard or regionLive (line)NeutralProtective earth
Europe, IEC 60446 (230 V) Brown Blue Green/Yellow
UK since 2004 (230 V) Brown Blue Green/Yellow
UK before 2004 (230 V) Red Black Green/Yellow
US and Canada, 120 V Black White · Grey Green
US and Canada, 120/240 V split phase Black · Red White · Grey Green

Local wiring regulations apply and can differ from this table or be updated. Work on mains installations must be done by a qualified person. In the US a bare copper wire is also accepted as protective earth.

AC mains: three phase

Phase conductors L1, L2 and L3, with neutral and protective earth.

Standard or regionL1L2L3NeutralProtective earth
Europe, IEC 60446 (400/230 V) Brown Black Grey Blue Green/Yellow
UK before 2004 Red Yellow Blue Black Green/Yellow
US, 208/120 V (common practice) Black Red Blue White Green
US, 480/277 V (common practice) Brown Orange Yellow Grey Green
Canada (CEC) Red Black Blue White Green

Local wiring regulations apply and can differ from this table or be updated. Work on mains installations must be done by a qualified person. US phase colours are custom, not an NEC requirement.

DC power

The convention used for batteries, solar panels, hobby electronics and vehicle wiring.

UsePositive (+)Negative (−)
Batteries, solar panels, hobby electronics Red Black
Cars and trucks (battery cables) Red Black

This is a convention, not a law: for fixed installations follow the local wiring rules, and always check polarity with a meter.

Car stereo power connector (ISO 10487)

FunctionColour
Constant +12 V (battery, keeps memory) Yellow
Switched +12 V (ignition or accessory) Red
Ground Black
Power antenna Blue
Amplifier remote turn-on Blue/White
Illumination (dimmer) Orange

Ethernet T568A and T568B

Pin numbers of the RJ45 plug counted from the left with the clip facing away and the contacts toward you.

PinT568AT568B10/100BASE-T1000BASE-T
1 White/Green White/Orange TX+ BI_DA+
2 Green Orange TX− BI_DA−
3 White/Orange White/Green RX+ BI_DB+
4 Blue Blue – BI_DC+
5 White/Blue White/Blue – BI_DC−
6 Orange Green RX− BI_DB−
7 White/Brown White/Brown – BI_DD+
8 Brown Brown – BI_DD−

White/Green means a white wire with a green stripe. Both ends of a straight-through cable use the same standard; with a crossover cable one end is A and the other B.

USB 2.0 cable

Wire colours of a standard USB 2.0 cable with pin numbers of the Type-A plug.

PinColourSignal
1 Red VBUS, +5 V
2 White D−
3 Green D+
4 Black Ground

RC servo connectors

Colours of the three wires by brand. Red is always in the middle and is always positive.

BrandSignalPower (+)Ground (−)
JR, Spektrum Orange Red Brown
Futaba White Red Black
Hitec Yellow Red Black

Ribbon cable colour sequence

Rainbow ribbon cable uses the resistor colour code: brown is wire 1 and the ten colours repeat every ten wires.

WireColourResistor digitAlso wires
1 Brown 1 11, 21, 31
2 Red 2 12, 22, 32
3 Orange 3 13, 23, 33
4 Yellow 4 14, 24, 34
5 Green 5 15, 25, 35
6 Blue 6 16, 26, 36
7 Violet 7 17, 27, 37
8 Grey 8 18, 28, 38
9 White 9 19, 29, 39
10 Black 0 20, 30, 40

Pin 1 is the brown wire, and many cables also mark it with a red or coloured stripe on the edge.

Frequently asked questions

What colour is the live, neutral and earth wire in Europe?

In current European installations (IEC 60446, 230 V single phase) the live wire is brown, the neutral is blue and the protective earth is green and yellow. Older wiring may still use red and black, so never rely on colour alone: confirm with a tester, and leave mains work to a qualified person.

Should I wire Ethernet as T568A or T568B?

Both carry the same signals, only the pairs are swapped. Pick one, use it at both ends of a straight-through cable and stay with it across the installation. A cable with T568A on one end and T568B on the other is a crossover cable.

Which USB wires carry the data?

In a USB 2.0 cable, green is D+ and white is D−, while red is the +5 V supply and black is ground. A charge-only cable may leave out the data pair.