I am fairly new to "electrical" engineering as a hobby/ past time. I have always loved electricity and have made simple circuits since I was a little baby.

I am now working on one of my first arduino projects and I started thinking about what color wires I should use for the different I/O and serial communication.

I know it doesn't matter, but I am curious: are there standard wire colors for things such as Tx and Rx, Digital IO, analogue IO?

It is very common that Red is "Positive" and Black is "Negative." I have also noticed that USB data wires are usually green and white. Are there other standards that are commonly used for other applications? Can someone give me a list please?


6 Answers 6


Obligatory link to the XKCD comic about standards:

Fortunately, the charging one has been solved now that we've all standardized on mini-USB. Or is it micro-USB? Shit.

So yeah, there are standards. There are so many of them that it's effectively the same as having no standard, as every possible wire arrangement likely has a standard that describes it.


There's no single standard everyone would refer to, but there are two common systems - one was introduced by DIN (DIN 47100), the other one borrows from the system you may know from resistor color codes (in this context sometimes referred to as UL/CSA):

Wire Color Schemes, DIN 47100 and UL/CSA

Note that DIN 47100 allows to arrange the wires in pairs; you will often find 1/2 (wht/brn), 3/4 (grn/yel), ... as twisted pair arrangements.

Sometimes, you will find ribbon cables or other pre-made cables with colors in one of these versions. If you need more than 10 wires, combinations are used.

These standards apply for signal wiring. Supply wires for small voltage DC often use red for positive, black for ground and blue for negative. For power installations, other systems are in use and must be adhered to.

  • \$\begingroup\$ Your Medikabel PDF link seems to have gone the way of the Dodo, sadly. But I was able to find this page on their site, which will pop up various lightboxes (ugh, you suck JQuery) containing color-codings — in English, even! — for a whole range of standards (thereby also providing support for the accepted answer). It sounds like it covers at least the contents of that PDF, though the information is presented in a maximally inconvenient — though admittedly quite pretty (in the case of their own custom jacket/core colorings) — manner. medikabel.de/en/technics/colourcodes \$\endgroup\$
    – FeRD
    Commented Sep 17, 2016 at 12:00

In electronics, red is usually positive power, black is ground, and the rest can be anything. It would be smart to avoid black or red for signals, but otherwise use what you have. Multiple signals with power and ground are often convenient to carry on a ribbon cable. In that case, you end up with whatever colors the cable has. Don't worry about it.

However, beware, at least here in the US the standard for the hot lead of electric power is black, neutral is white, and ground is green. If you install house wiring, you should follow this code (or whatever local code there might be in your jurisdiction) but never count on others having done so.

The best thing about standards is that there are so many to chose from ;-)


Nope. With black and red you have mentioned the ones which are rather standard. But like the answers to this question say you sometimes can't even rely on black being ground. It's the jungle.

Best thing you can do when you start breadboarding is to use as many different colors as possible, so that you can tell them easier apart if the wiring would become a bit messy. At work I use a set of 10 different solid colors, and you may find two colored wires as well, which give you a lot more variation.

  • \$\begingroup\$ Power wiring has local standards that must be applied. At low voltages, it’s more of a convention, but do not mix the two. Within a breadboard, anything goes. But every external interconnect should follow a consistent approach. Document that carefully. \$\endgroup\$ Commented May 22, 2021 at 11:36

Indeed power red and black.

The colors wire I have available are similar to those used for color rings on resistors and what I usually do with Arduino's is using a color wire that corresponds with the pin number of the Arduino. In this manner it is relatively easy to see which wire is connected to which pin.

So pin number 0 => black; pin number 1 => brown; 2 => red; 3 => orange; 4 => yellow; 5 => green; 6 => blue; 7 => violet; 8 => grey; 9 => white; 10 => black (again ..., don't confuse with power); 11 => brown; 12 => red; ...

Same for analog input pins (A0, A1, ...).

Most of the time I have little trouble seeing the difference between red for power supply and red for pin 2 (same for black), because they come from an entirely different location on the Arduino. Also for power I like to use somewhat longer wires, which makes it easy to identify them too.

Many pins on Arduino have more than one function, which makes it difficult to identify a pin for eg. RxD as in your next project this pin can have an entirely different function. Personally I like the use of screw shields. I attach wires to Arduino ones and they seldom come off once connected. Many variation on the theme of screw shields exist. Some are more expensive than others, mine look like these

enter image description here

Personally I use this trick in many cases where I have to wire many connections. It is simple and easy to remember (once you know your color rings).


I also think it is strange that there isn't a standard for signal types. I'm using my own standard and try to be consistent with cable color as well as when measuring with a four channel oscilloscope, usually with colors yellow, blue, green and magenta. My system is as follows:
YELLOW: Chip select / control / enable signals (like in SPI CS)
MAGENTA: CLK - always
BLUE: digital signals, and master OUT when paired with:
GREEN: digital signal master IN, or analog signals.

Orange usually for other DC voltage lower than the red (e.g. differentiating 5V red and 3V3 orange). White/brown are used whereever needed, usually other digital signals.

So, SPI uses all four colors, I2C and SWD uses magenta and blue. Helps me a lot when documenting my measurements

  • \$\begingroup\$ What do you mean, there are dozens of standards for wire colour usage, but why would there be a standard what colours to use for UART or SPI signals - they are not really meant to run on wires anyway, at least not for long enough that you would need to standardize it like Ethernet or mains supply wiring. \$\endgroup\$
    – Justme
    Commented Jun 5 at 10:04
  • \$\begingroup\$ Green or black is usually reserved for ground \$\endgroup\$
    – Voltage Spike
    Commented Jun 5 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.