# Why are X, Y and Z axes represented by Red, Green, and Blue?

It is pretty standard that 3d axis, XYZ, is represented as red green blue, respectively. Why is this and who first proposed the colors in that configuration?

• I don't think it is standard. I'd never seen it (though admittedly I don't do that much with 3rd party programs) until now. – jamesqf Jun 2 '15 at 19:29
• While that colouring is common, I don't think the configuration you show is all that standard in 3D modelling programs. The engineering configuration I'm familiar with has Z directed upwards, and Y directed into the page. – sapi Jun 2 '15 at 22:27
• @sapi The configuration shown is standard. Based on the right-hand rule. Have X Y or Z up is irrelevant. You must be thinking of some program you saw which uses the Global coordinate as Z up, but that does not make every axis in the system use Z up. – user-2147482637 Jun 3 '15 at 2:24
• @plainclothes An axis is the most basic element of a user experience in representing 3D space. The color has no mathematical significance. Color combination and coordination are part of user experience. – user-2147482637 Jun 3 '15 at 4:03
• @Pharap to clarify, we're talking about three distinct colors used to highlight three distinct axes. Pretty simple from an info vis perspective. The historical origins of the colors don't have much relevance to UX. Apparently, not many share this belief, so I'll drop it. – plainclothes Jun 3 '15 at 15:46

In the picture we can say that it right and proved and z axis is the 3rd axis on the graph and it is for 3-dimensional objects or theories

You can use that RGB system to create Normal (Bump maps), I show them in this video (watch from middle): https://www.youtube.com/watch?v=VHpY7Aia1V0&t=68s

In the early 90's, I used red, green and blue lines to represent X Y and Z axes in my cad starter files (empty files that just had a few lines in them so you had somewhere to start drawing and orient yourself), because it just seemed logical. I was really into color theory, and I was very familiar with dealing with both rgb pixels and 3d points programmatically, both of which are triads of numbers.

Then I wrote AccuDraw, in 1994 (patented in 95 and granted in 98 I think), and it used red and green for X and Y. I'm not sure if there was ever a reason to use blue for Z (even though Accudraw does 3d well), but in my head Z was blue.

Later other things used it, someone mentions Maya in 1997. I'm going to say they were probably familiar with AccuDraw and got the idea from it. However, it also seemed rather obvious to me, so maybe they just decided to do it for the same reason I did.

• This is the only response on this thread that sounds remotely like a verifiable answer. I still think the question is way off topic, but it has enough views to deserve an insightful response. Thanks for stopping by Rob. – plainclothes Sep 7 '16 at 6:51
• Sounds like fun stuff. Hope you'll drop in more often. – plainclothes Sep 8 '16 at 5:00

All the answers seeem to go off on a false premise, that it's a "standard" to color the axes red, green and blue but, in all my years of studying math, I have never, ever seen that except while on the topic of RGB in 3D graphics. If a chart is using red/green/blue to color the axes that way, I would not think anything of it myself and only believe it to be accidental or convenient to its creator. No other reason.

• It's pretty much the de facto standard for 3D modelling software. To be honest though, how many times when doing maths do you draw a colour image of three arrows representing the x, y and z axes? Most people will never need three coloured arrows representing the x, y, z axes unless they are doing 3D modelling, in which case they'll probably be using them all the time. – Pharap Jun 3 '15 at 12:53
• This is a fair point. I think everyone assumed this was in reference to 3D modeling UIs but on second read, there's nothing in particular that refers to that. – DA01 Jun 3 '15 at 15:46

The correct answer is extremely simple. Going back to the days of analog television technology, as it happens "RGB" was a commonly-used phrase.

The technical reason WHY the colors red-green-blue were used as the triplex in the TV era, the "electronic" era of you will, the pre-digital era, can trivially be looked-up, and are not relevant: the simple fact is "RGB" was an extremely commonplace ... indeed the ONLY commonplace ... set of three colors, in that order, which were mentioned over and over in the "electronic era".

Hence, those tree "famous colors, in that order" are used for 3D icons.

There is utterly no, whatsoever, connection technically between the two.

If the universe was France, the only famous "three colors" would be "blue, white, red" so those three colors would be used. However, "RGB" are the most completely commonplace three colors, so, they became used.

There is utterly NO technical connection between the two realms.

Please note that some of the answers here explain WHY tv technology used r, g and b. That's fine, but the fundamental reason those three are used in Maya, etc, is extremely simple: the most famous "color set of three" is indeed RGB: that's the only reason.

Exactly as user19 asks in a comment above, "this is interesting, but doesnt really answer what i was trying to ask...." exactly. there is utterly no technical connection whatsoever between "tv technology" and why RGB are inevitably used in Maya, Unity3D etc. It was just, simply, the most famous phrase or idiom mentioning three colors.

Other famous sets of "three colors" might be "red yellow green", but you never see the abbreviation "RYG". The abbreviation "RGB" is extremely simple and universal.

I can't immediately think of any other sets of "three colors" that are commonly mentioned (for whatever reason) - other than national-flag related sets. "RGB" was just the inevitable choice, it's so "standard" and "everyone has heard it".

• RGB is famous because it is the additive colour model, it was well known before the creation of television and was used in photography as far back as the 19th century. Either way your answer doesn't explain why x is red and not green or why z is blue and not red. – Pharap Jun 3 '15 at 13:01
• There's nothing particular analog or digital about RGB. Digital TVs use RGB just as analog TVs did. – DA01 Jun 3 '15 at 15:47
• Pharap - as it says in the answerr "XYZ" if the usual order of "XYZ" and "RGB" is the usual order of "RGB", so they align: it's that simple. – Fattie Jun 8 '15 at 10:56

The reason why the first component is right, the second component is up and the third component point towards the observer is the right hand rule used in the mathematics and physics. It is pretty standard and there are only very few exception (DirectX on Windows is one notable exception). The explanation in wikipedia is not easy to understand, more simple: Thumb up (first finger), stretch index finger (second finger, you have a 90°) and point middle finger out of the palm (third finger). This is the right-hand coordinate system.

As the order of the components is set, the order of colors is in fact as user66808 correctly noticed the order of their frequency. While the wavelength has the inverse order, in physics you start the electromagnetic radiation from left with alternate current and end with X-rays and cosmic radiation at the right so light is ordered with increasing frequency.

While this explains the question, I think there are some misconceptions here. First, red, green and blue are the primary components of creating color. A paper in the dark remains dark, but a monitor creates colored light and can therefore illuminate objects. A monitor can create almost all colors (not exactly because some spectral colors cannot be created by RGB mixing), but a paper only modifies incoming light, so if you don't have white light, the paper color changes. The reason why the "standard colors" are more familar is that painting was invented first.

Strictly speaking, the standard colors are not yellow, red and blue, but Cyan (blue-green), Magenta (Purple) and Yellow. Cyan absorbs red light strongly, magenta absorbs green light strongly and yellow absorbs blue light strongly; the other components are reflected back and create the perceived color by mixing the remaining components. So if you look at a cyan paper under red light, you see only a dark grey paper because there is nothing to be reflected.

• Not a bad answer, but I think it's over-complicating the explanation of additive vs. subtractive color spaces. Also note that there's not necessarily consensus that RGB can produce more colors than CMYK. The main thing to remember is that they share a lot of colors, but both color spaces have colors the other can not reproduce: rgb vs cmyk gamut google.com/search?q=rgb+vs+cmyk+gamut&tbm=isch – DA01 Jun 3 '15 at 15:45

To answer the other part of the question, the first software I recall seeing the colored axes in was Maya, which uses the colors in the 3D manipulator tools as well as in the lower-left corner of each 3D view.

Searching online, the earliest I've seen this scheme in use is in Maya's predecessor, PowerAnimator 8.5 (1997) -- as seen, for example, in a South Park making-of article.

The same coloring does not appear to be present in 3D Studio R4 or Softimage Creative Environment 2.66 screenshots from around that time.

The problem is "how do you represent a color?" One approach is to use a color space where the axes are the colors used in the model. In the RGB model, each of these are values on the same scale which gives us a cube:

A given color can be found at the X,Y,Z coordinates corresponding to R,G,B.

One should point out that this isn't the only color model and there are ones such as HSV and HSL that are represented as cylinders:

Color theory itself goes back quite a ways. The RGB model is described as originating in the late 19th century by "German and English scientists".

• Actually HSV and HSL are more often depicted as cones. See: upload.wikimedia.org/wikipedia/commons/thumb/f/f1/HSV_cone.jpg/… – RobAu Jun 3 '15 at 11:08
• The question is not, "How do you represent a color?" – Rob Jun 3 '15 at 12:15
• The question isn't about representing colour. This is ux, the question is about why x is represented by red, why y is green and why z is blue. Explaining the additive colour model answers why RGB and not any other colours, but it doesn't explain why x isn't green and why z isn't red. – Pharap Jun 3 '15 at 12:43
• @Pharap it does explain it in the sense that it is called the "RGB" model, not the GRB model or the BRG model or the like. For whatever reason, we have standardized (long ago) on red coming first and blue coming last. The spectrum of light is usually shown with red on the left. And so on. So it is natural to map RGB to XYZ. – rob Sep 9 '16 at 20:18
• @rob Yes, but this particular answer doesn't explicitly say that. Hence my comment is on this answer and not on any of the others. – Pharap Sep 10 '16 at 15:58

## It's a mnemonic

The 3D axes are almost always referred to in the order XYZ (not ZYX or any other order)

If you are going to color the axes, RGB is the easiest scheme to use because it's the most commonly recognized triplex of colors.

If you are going to use RGB, then mapping R to X, G to Y, and B to Z is the most obvious and memorable mapping because users simply map the colors to axes in the same order as their acronyms:

In other words, it's the most convenient mnemonic.

• @Chris Most common in what way? Most any kind of software that uses numerical values for colors allows for RGB, even if they don't allow another system. There may be exceptions of course, but I think it's hard to argue that RGB isn't the most common primary color triplet. Personally, I haven't yet come across any kind of software that prominently used RGY and it's the first time I've heard of it to be honest. I don't see how it would be preferable from a UX perspective. – mechalynx Jun 2 '15 at 15:41
• @Chris for additive color mixing R, G, B are the primary colors. These are generally the three colors your eye sees as well. If you are going to throw Yellow into the mix you'd usually bundle it with cyan and magenta in stead of blue and red. These are subtractive color mixing primary colors. Also common depending on what field you work in but no more common than RGB. – Brad Jun 2 '15 at 15:56
• Comments are not for extended discussion; this conversation has been moved to chat. – Benny Skogberg Jun 4 '15 at 8:55
• @tohster I think your answer is absolutely right for the "why" part of the question, as to the "who" part, I'm going with "me." :) (see my answer below) – rob Sep 9 '16 at 20:07

It is actually biological. Our eyes perceive color through small photo receptors called cones. There are 3 types of them - Short wavelength sensitive(blue), Medium wavelength sensitive(Green) and Long wavelength sensitive(red). This is Young-Helmholtz theory. RGB is just in the order of long to short wavelength of light. http://en.wikipedia.org/wiki/Young%E2%80%93Helmholtz_theory

First experiments on adapting this theory to color photography were done by James Clerk Maxwell. He is the one who introduced the color triangle. http://en.wikipedia.org/wiki/James_Clerk_Maxwell#Colour_analysis http://en.wikipedia.org/wiki/RGB_color_model#History_of_RGB_color_model_theory_and_usage

This concept then expanded into television tubes, Digital color, LEDs and LCDs. The RGB hexadecimal code we use to represent colors is just a digital representation of a once analog color scheme. Hope this helps

• red is long wavelength (see e.g. en.wikipedia.org/wiki/Light#/media/File:EM_spectrum.svg), I've already updated your answer. – peterchen Jun 2 '15 at 7:42
• this is interesting, but doesnt really answer what i was trying to ask... LED,LCD etc. uses RGB because of the way light acts in order to display images for us. What i am wondering is when this became used as the colors for an Axis, which could have been any color, and even if using primary colors, the blue could easily be Y instead of Z, so when did this become the convention – user-2147482637 Jun 2 '15 at 9:46
• shouldnt red be pointing towards us and blue away? red shift etc... – colmcq Jun 2 '15 at 10:41
• @colmcq That's overthinking it :) The actual explanation is a lot simpler. Also, there's several schools of thought as to what orientation of the "arrows" is proper. You have left-handed vs. right-handed, Z-up vs. Y-up etc. Not to mention that you usually don't care all that much about -Z vs. +Z - the distinction is based on the axis (base vector), not the direction. – Luaan Jun 2 '15 at 13:41
• That's a good technical explanation of what RGB is but doesn't really answer the question. – DA01 Jun 2 '15 at 17:26