3

I was trying to find the opposite of a web color (let's take #917AFA as an example) and an online tool told me that it is #6E8505. Then, I used another online tool to find the color that is exactly in the middle between two arbitrary web colors, typed in these two opposite hexes, and got #808080 (medium gray, exactly). Then I tried doing the whole "experiment" a couple more times and always got #808080, from which it became obvious that it was no coincidence, however it was surprising to me.

My question: In general, does taking two opposite colors (not specifically web colors) and finding the one exactly in the middle always result in medium gray?

7
  • I guess it depends how you calculate it. The mid-point in a circle will be one of two equally valid numbers, in effect quartering the circle. The actual mid-point ignoring the "stay in the same circle" rule will always be dead centre of the colour wheel… mid grey. – Tetsujin Dec 29 '20 at 15:49
  • Well if you look at human visual processing as opposed to a color wheel that would be correct. – joojaa Dec 29 '20 at 16:58
  • @joojaa do you mean the thing I described in my question body is actually part of our biology? Can you elaborate on the "human visual processing" part in a proper answer? I would love to read it. – Alex Dec 29 '20 at 17:40
  • Thats the only kind of color that is opposite. – joojaa Dec 29 '20 at 17:49
  • @joojaa I don't really understand what you're telling me. A full answer would be good. – Alex Dec 29 '20 at 17:55
2

When we talk about two RGB colors being "opposite to each other" we are talking pure math.

Two colors opposite to each other in the RGB color model isn't necessarily the same as what our eyes would perceive as "opposite" or "complimentary".

By definition we have chosen that if one of the colors is

[r, g, b],

the opposite color would be

[255 - r, 255 - g, 255 - b].

So the midpoint between these two opposite colors (or the average) is also by definition a medium gray:

[(255 - r + r) / 2, (255 - g + g) / 2, (255 - b + b) / 2] = [127.5, 127.5, 127.5].

In other words, talking about two RGB colors being "opposite to each other" is the same as talking about two colors that "averages to a medium gray".

1
  • That is what I kinda suspected, which is why I asked the question in the first place. – Alex Dec 30 '20 at 16:58
3

Nice question. Take a look at this one: How do you find an inverse colour?

The answer is yes but only in the case you are using a 3D "mathematical" color model.

Sometimes you can define the opposite color but on a 2D plane (A), and the answer could be white.

enter image description here

The Hex color notation is a cubic mathematical color model, a 3D one, so the answer on this case is also yes.


But there are some other color models where it is not clear which is the "opposite" color.

These solids can be "perceptual" models. One example that comes to my mind is the Munsell solid.

Here is a screen capture of one slice, taken from https://en.wikipedia.org/wiki/Munsell_color_system and you can see that a lot of "opposites" converge in a middle gray, but some of them do not.

enter image description here

It is also clear that the "middle" is a bit subjective in this case. The center column is a neutral gray, but some hues have more chroma levels than others.

enter image description here

There many other color models and 3D representations of them. We use the simpler ones for computer graphics, mainly RGB, HSL, HSV where we can use simple arithmetical operations can be made. But as we dig a bit more we find more color models or 3D representations that require more complex math to process.

2
  • Do our brains "use" a 3D or a 2D color model? – Alex Dec 29 '20 at 17:41
  • @Alex, no. Neither does it use color circles. Look color science is actually really convoluted. Its actually easier to explain how to build a rocket than how the whole system works. Essentially there is no such thing as color in middle of another color. Middle is not a process that can be described, but several things could describe different possible "middles" – joojaa Dec 29 '20 at 19:19
2

The answe by @Wolff answers why you get this result. You get that because of your definition. But is it meaningful?

Well, no. Interpolation of color is very ill defined. What color is between two colors is thus also ill defined. But inverse of a color is defined. You just have to be very careful here. When we talk about color we talk about several things.

The inverse that you get from RGB is not really the same inverse as a human percieves. But it is more or less the same inverse as film would see. Human visual system instead, measures yellow as the opposite of blue, and red opposite to green. Which is not entirely what one would anticipate calculating in RGB.

You should probably calculate colors in Lab color space if you want to do some deeper analysis. Just be aware that interpolating in Lab isnt defined any better. But you will notice that if you calculate opposites in RGB and find the middle in Lab then you get something that likely isnt neutral gray.

Now there is more... See you might simulate physical processes, so you may ask what is the result of mixing two filters 50/50 or two emitters for that matter. Well now you need to account for the spectral distribution of the sources. Because of a phenomena called metamerism, two sets of otherwise indistiguishable filters/sources may yield different results. So much so that middle of 2 colors can be nearly anything.

And there you have it the technical system of your monitor is tuned so that the halfway should be somewhat neutral assuming your viewing conditions are right, and neutral is defined as smack middle of your gamut. But offcourse a monitors neutral is likely to be a bit blue. You havent found anything fundamental, just that you have made a circle definition.

There is more, much much more... You may also need to account for human autobalance... And so on its a deep rabit hole.

So as you see. It isnt that the halfway is neutral gray necceserily its just that you have framed your question. And ultimately how you choose to compute things that makes it so. But there is no definitive answer what it should be.

1

We have devices such as RGB screens or printers which produce more or less colored images in front of our eyes. The impression of colors is born in the mostly uncharted grey matter area behind our eyes and between the ears. That grey matter gets its stimulation from our eyes which have three types of light sensing cells which are a little differently sensitive to make nerve signal electricity from different light wavelengths.

Scientists have teased thousands of people with hundreds of thousands of tests "what do you see, which of these is brightest, turn the knob until these look the same, etc..." and gradually learned to construct screens and printers so that to some degree repeatability is achieved what color impressions screens and printers stimulate to occur. Of course I cannot have a slightest idea what impression you get when watching for ex these letters, but at least we very likely can agree that words "black on white" fit.

The successful construction of screens and printers has created one bad illusion. Even I have noticed that I sometimes say a RGB number triple, say R=50, G=100 and B=150 is a color. It is not. Those numbers control currents in the leds of my screen or they are put to affect in some other way how bright light red, green and blue lamps in a screen send. It's me who see the result as a color.

The opposite in RGB system for that triple is R=255-50=205, G=155 and B=105. Common computer software makes it with command "invert".

The average of an RGB triple and its inversion, in this case calculated as R=(205+50)/2 = 127.5, G=127.5 and B=127.5 gives always the same RGB numbers, all three= 127.5 (or 128 as rounded in common software). As you have noticed, it really looks on the screen something that most of us call grey. So well the scientists have succeeded to classify the color impressions of people and so well the engineers which design computer screens have succeeded to apply what the scientist have found that we have a common name "grey" to our personal impressions.

2
  • 1
    Just want to clarify something you almost mention: By definition we have decided that the opposite color of a color [r, g, b] is [255-r, 255-g, 255-b] so the mid point between those is also by definition a medium gray [(255-r+r)/2, (255-g+g)/2, (255-b+b)/2] = [127.5, 127.5, 127.5]. It's not some coincidence which tells us something about nature. It's just a convention. – Wolff Dec 30 '20 at 12:05
  • @Wolff your comment was much more enlightening to me than the other answers. You should probably leave a full answer elaborating on what you have said so this question is not left without an accepted answer. – Alex Dec 30 '20 at 12:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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