Reference sheet
Wiring colours
The colour conventions for DC, mains and signal wiring

Wiring color codes
General conventions — always verify against the local electrical code before touching mains wiring. DC and signal wiring have no equivalent formal code; they're just the convention every battery, breadboard and sensor cable already assumes.
DC (batteries, breadboards, low-voltage projects)
| Role | Color |
|---|---|
| Positive (+) | Red |
| Negative (−) / return | Black |
| Chassis / earth ground (where distinct from the return) | Green, or bare/uninsulated |
Signal / sensor cables (3-wire breakouts, servo leads)
| Role | Color |
|---|---|
| Power (VCC / +) | Red |
| Ground (GND / −) | Black, or brown on a servo lead |
| Signal / data | Yellow, white or orange — varies by manufacturer, unlike power and ground |
AC mains, single phase
| Role | US (NEC) | EU / IEC |
|---|---|---|
| Line / Live / Hot | Black (or red for a second hot) | Brown |
| Neutral | White or gray | Blue |
| Ground / Earth | Green, or green with a yellow stripe | Green with a yellow stripe |
AC mains, three phase (120/208/240V-class service)
A 277/480V NEC service commonly uses a separate brown/orange/yellow code instead — a different code, not a typo, and one more reason to always confirm colors on-site rather than assume from a table.
| Role | US (NEC) | EU / IEC |
|---|---|---|
| L1 | Black | Brown |
| L2 | Red | Black |
| L3 | Blue | Grey |
| Neutral | White or gray | Blue |







