Tuesday, May 16, 2017

What is the opposite of yellow?

There is a controversy about complementary colors!
Will the most complimentary color please stand up!

I watched an interesting YouTube video the other day that answered the question that has been foremost in the hearts and minds of Americans these days: "Why Are So Many Popular Cartoon Characters YELLOW?"


Channel Frederator (that's the name of the guy in the video, or something like that) gave a very entertaining answer to this question. I won't spoil it for you. I will let you watch the video to find the answer.

The complement of yellow is purple

I want to zoom in on the explanation of complementary colors. Frederator first showed the artist's color wheel. This wheel is designed around the color system that I learned about in kindergarten... when I wasn't chasing Tammy around the playground. 

The artist's color system is based on the set of artist's primaries: red, blue, and yellow. Someday, I will write a blog post that totally destroys this silly notion about this silly set of primaries, but for the time being, let's just accept these as a hymn from the gospel choir with shouts of Alleluia! coming from the congregation. Here is an actual screenshot from the video, defaced with some childish scrawling from me.


Artist's color wheel, showing purple opposite yellow

So, yellow's complementary color on this wheel is purple. Or, to put it in the words of Frederator, "So, yellow's complementary color on this wheel is purple." (At the 2:45 mark in the video.)

The complement of yellow is blue

Now the controversy starts. Frederator then describes a second color wheel, based on another set of color primaries. In this view of the colorverse, the complement of yellow is blue! This is just too much for my simplistic brain to hang on to!!


RGB color wheel, showing blue opposite yellow

***** Pause for public service announcement *****

Would you like to be informed of new John the Math Guy blog posts? Send me an email to let me know that you want to join the cool group of people on my mailing list!  John@JohnTheMathGuy.com.

***** End of public service announcement ********

The complement of yellow is purple blue

I wish it stopped there. Albert Munsell, the father of Color Science, developed his own color system something over 100 years ago. His color system is three-dimensional, however the following image shows just a slice of it. The illustration below is unrepentantly stolen from the Munsell website. Again, I scribbled on it with my Photoshop equivalent to crayons.

Munsell color wheel

In the Munsell system, the complement to yellow, which Munsell euphoniously named Y. The complement of Y was neither purple nor blue, but PB. I am not sure whether PB stands for peanut butter or purple-blue. I will have to ask him next time I bump into him.

You might say that Munsell found a compromise between these two warring factions. That might not have been his reason for spending the majority of his adult life researching color and inventing the Munsell Color Tree, but this is indeed a compromise. My wife tells me that she knew this all along. The complement of yellow is either blue or lavender / purple. I wish she woulda told me before I wasted all that time on the blog!

The complement of yellow is blue

Now, let's get into some more recent science. Munsell did some scientifical stuff -- I am not suggesting otherwise -- but there has been some progress in organizing crayons since then. Here is an attractive diagram that shows a color wheel based on the CIELAB color space.

Dieser CIELAB-Farbkreis zeigt für ΔHue=10 die jeweils
in CMYK erreichbare höchste Chromazität.

I need to back up just a bit. The CIELAB color space became an official standard in 1976. It is based on a long line of work that started with Munsell, but included the work of many luminaries in the field of color: MacAdams, Adams, Nickerson, Hunter, and Glasser. From a qualitative standpoint, the CIELAB color space looks a great deal like the Munsell color space. Today, CIELAB is defined in the ISO standard CIE 15:2004, and has been chosen as the official color space of the 2018 Olympics. So, it is considered good science.

From a casual glance at the preceding diagram (the one with the German caption which I clearly never bothered to translate), it's apparent that the color directly opposite yellow is a shade of blue. It would seem that Munsell's compromise got lost somewhere.

But, I am cautious in drawing this conclusion. First, the diagram looks real slick, but how do I know that it's correct? This is especially important since the interpretation of RGB colors in an image is up for interpretation. Without a color managed workflow, we can't know that the color that shows up on my computer monitor is the same as the one that showed up on the computer monitor of the person who created that slick graphic. To add to the ambiguity, who's to say that my perception of blue is correct? My wife would certainly argue otherwise. Call her up. She would be glad to tell you that I am wrong about virtually everything.

(Comment from my wife: Except for the fact that I was right to marry her--she's actually quite ecstatic about that.)

I just happen to have a previous blog post about color naming that could provide a more meaningful answer. In this blog post, I congealed a bunch of data about the CIELAB values of a variety of fundamental colors. I repeat the fabulous diagram below.

The fabulous diagram that was referred to in the text

Based on the above diagram, which gives CIELAB ranges for some basic color names, the CIELAB answer to the question of what is the complement of  yellow is blue. 

So, what-people-would-call-blue is the complement of what-people-would-call-yellow

Did I say purple blue? I meant blue

Did Munsell really mean "purple blue"?

There is something of a bridge that connects the Munsell color space to CIELAB. This bridge is called the Munsell Renotation Data. This is a table of 2,729 colors, where each color is expressed using the Munsell notation and in CIELAB values. These values can be used to test whether the Munsell and the CIELAB answers to the question of complementary colors are consistent.

I selected all the entries in the renotation data that have a hue of 5Y. This hue designation is in the center of the yellow group of hues. They have an average CIELAB hue value of 98.3. There was a bit of variation, so I also looked at just the most saturated colors in the 5Y family. If I select only those colors of high chroma, the average CIELAB hue is 93.7. Where does this put the complement? These hue values are in degrees, so this would put the complement of yellow at a CIELAB hue of -81.7 or -86.2. I did the same computation for the PB5 section of the table. I got CIELAB hues of -86.8 and -82.2.

My conclusion is that Munsell and CIELAB are basically in agreement as to the complement of yellow. It's blue, ok? The only odd thing is that Munsell seemed to think that it should be called purple blue. Something else I need to talk with him about the next time we have a beer together.

The complement of yellow is yet to be decided

Ok... how about two more approaches to answering the question? Both start with another question.

Q: What is the complement of yellow?

A: What do you mean by "complement"?

Why didn't I think before to question the question? 

One answer to the second question is that complementary colors means that the two colors look good together. That's a kinda fuzzy definition. How can I make that definition a bit more solid?

I could perform a huge psychometric experiment to answer this question. I would recruit a bunch of volunteers and ask them to tell me which of the three colors below (purple, purple blue, or blue) go better with the yellow. 

Which shade goes better with yellow?

So I'm recruiting you. Since you made it this far in the blog post, I assume you may actually have an interest in the topic. Which of the three shades go better with yellow? Answer in the comments below. (Note that I moderate the comments, since there is a fair amount of spam. Please don't get upset if your vote doesn't show up for a day or two.) I readily admit that the answer likely depends on the characteristics of your computer monitor and viewing conditions, but... baby steps.

The complement of yellow is bluish purple blue

I present another answer to the secondary question about what complementary color means. But first let me show you an optical illusion I just created. I'm pretty excited about it, so I just had to show someone.

Please take a moment to find the star in the image below. Once you have identified the star, please find the black dot within the star. Stare at the black dot in the middle of the star for ten or twenty seconds, and then look at one of the other three black dots. I find this works best with the room lights darkened, with a glass of a full-bodied red wine in hand, and with some Gato Barbieri playing softly in the background. The presence of a full-bodied person of your prefered gender is recommended, but not required.


When you avert your eyes to one of the other dots, you will see an afterimage of the yellow star, but it won't be yellow anymore. I added some white space below the black dot so you can better assess the color of the afterimage, and to compare it to one of the three afterimage colors. It will likely come close to matching the hue of one of the three background colors. For me, the afterimage star was somewhere between the hue of the purple blue and the blue background.

For my wife, the experience was a little different. She says: Doesn’t the color of the star vary depending on which background color you look at? When I looked at purple it was slightly darker than the purple and when I looked at blue it was slightly darker than the blue. Just saying. 

She's right, but she missed something really subtle in what I said. I used the word hue, and not color. In my silly little manner, I just assumed that everyone would know that I was talking about the more technical definition of hue, which is roughly speaking, the position on the color wheel. Pink, red, and brick red are different colors but have more or less the same hue.

Now try a variation on this. Take another sip of the Malbec, and stare at the star for another ten or twenty seconds. Then avert your eye slightly to look at one of the tips of the star. The purple or blue afterimage star will follow your eye for a moment, until it fades. Hang onto this thought while I transition into the next section.

Seymour's hypothesis of complementary colors

Here's my own explanation for the phenomena of complementary colors. Maybe this explanation has been articulated elsewhere - I don't know. It didn't occur to me until I was writing this blog post. If one of my readers has seen this explanation somewhere else, I would be happy to hear about it.

Thomas the Tank Engine demonstrates saccades

Our eyes are always moving around, even when we are not consciously moving them. This is known as saccades. Because of saccades, we are always seeing these afterimages. Generally, we are not consciously aware of them, but I hypothesize that they may interfere with our perception of adjacent colors. If the afterimage has a significantly different hue than the adjacent object underneath, then the edges of an adjacent object will change hue whenever our eye wiggles around. 

This constantly shifting hue will subliminally interfere with our ability to parse out the various parts of the image. If the afterimage has more or less the same hue as adjacent colors, then there is no interference, and we see harmony.

That's my hypothesis, anyway. I welcome comments, unless the comments are negative.

What causes an afterimage?

(Warning: The following material contains references to scientifical stuff, and hence may not be suitable for all readers.)

Now for the psychofizziks behind the afterimage effect. 

When we see something, photons are captured by photoreceptors in the eye, putting the photoreceptor cells in an excited state. The excitement in the cells triggers a reaction that results in a nerve impulse. I see the light! But, photoreceptors being what they are, it takes a little while for them to settle back down. They sit out on the sidelines for a bit before getting ready to capture the next photon.

A wideband photoreceiver who can't wait to get back into the game

BTW - I used a football analogy to explain what the photoreceptor is doing. In actuality, though, the analogy (much like everything else about football) is exactly backwards. The photoreceptor doesn't sit on the sidelines to recharge, but rather to discharge. Catching the photon gave it more energy, and that energy has to be dissipated before the next cycle can begin.

When a single photoreceptor is on the sidelines, we can still see because there are plenty other neighboring photoreceptors to catch photons. But each photoreceptor that is sitting out increases the probability that a photon can pass unnoticed. So, as more and more photoreceptors are sitting on the sidelines (i.e. when there is a lot of light), the eye becomes relatively less sensitive to photons.

This effect happens independently for the L, M, and S photoreceptors. (These represent the long, medium, and short wavelength cones in the eye, roughly relating to red, green, and blue light.) For example, the L and S photoreceptors may have a relatively large proportion of photoreceptors on the sidelines, while the M photoreceptors are pretty much all in the game. This isn't a random example, this is what happens when we see yellow.

When we shift the eye so that those photoreceptors are now seeing white, the S photoreceptors that were seeing yellow are very sensitive to the incoming blue photons, so there is a blue signal. This is true until the blue photoreceptors have reached equilibrium. The L and S photoreceptors who were seeing yellow have already adapted, so they are relatively less sensitive to photons in their part of the rainbow.

(Literally as I write this, I got an email telling me that an old buddy of mine just published a paper with some of his buddies entitled "The constancy of colored after-images". Naturally, I didn't actually read the whole thing, but the authors apparently argue that the brain has something to do with the afterimage effect.  

The complement of yellow could be blue or purple

The chromaticity chart can be used to predict the color (or at least the hue) of an afterimage color. We start by looking at yellow-- the start of the arrow on the diagram. When we look at white, represented by the black dot in the diagram, we have effectively added in some of "the opposite of yellow, so the hue we see is directly opposite of the hue of yellow. This diagram gives us an answer to the question of "what is the complement of yellow?" From the diagram, we can see that it's blue. Case closed. Blue is the unequivocal complement of yellow.

Chromaticity diagram, adapted from this site

But now it gets fun! Notice that the answer depends on where the white point is. The following chromaticity diagram shows that a cool white point (I show 55K, which is where my computer monitor is set) gives us a complement of yellow that is blue. The diagram also shows what happens if the white point is  warmer, as from an incandescent bulb. In this case, the complement of yellow is decidedly purple. I don't think this has ever been said before: The complement of yellow depends on the white point.

The complement of yellow can be either blue or purple

I have made a strong and possibly controversial statement. I put it in italics and copied it as the caption for the above image just to make sure everyone realizes just how important the statement is. But I have a little secret just between you, Dear Reader, and me. I'm not sure I fully believe what I said! 

18 comments:

  1. Nice discussion. Since you clearly have lots of time on your hands your should check out the NTS color system. It is basically the Munsell model but circumscribed to show only the colors that the human eye can actually see. This bit about what can the human eye can actually see changes everything taking it from the theoretical to the actual. Have fun figuring this one out!

    ReplyDelete
    Replies
    1. Oh... lots of time!!

      Did you mean the NCS color system? Thanks for reminding me. Since I am in the U.S., I try really hard to ignore anything from Europe. ;)

      Delete
  2. Excellent arguments. Our eyes have RGB cones and we perceive yellow when R & G stimulated. This means blue is complementary to yellow?

    ReplyDelete
    Replies
    1. A very reasonable conclusion. It is based on a simplified model of the eye. One cones are not exactly RGB. The long-wavelength cone in the eye would not properly be called "red", since it overlaps a great deal with the mid-wavelength cone.

      Delete
  3. Yes, that image from the Munsell color blog is shared often. Funny thing is, that isn't the way Munsell ordered his hue families. It's backwards. But! One may argue it's published on the Munsell color blog.

    It's still backwards. I'll concede for all intents and purposes that it still works.

    As stated in The Munsell Book of Color, "Reading clockwise from Red, the sequence is: Red, Red, Yellow-Red, Yellow-Red, Yellow-Red Yellow, Yellow, Yellow Green-Yellow, and so forth." (pages 13 and 14) This too is published on the Munsell color blog. Ironic, no? https://goo.gl/1OsCL7

    If not confusing enough, the linked blog post copy states that N/3 is in "the exact center of the Sphere." Yet on page 11 of the "Munsell Book of Color, it says it's N/5.

    As far as the "true" complement of yellow, I'll go with Munsell's purple-blue because I like how his admixture/neutral gray theory of complements aligns with practical human perception. While the after-image business is certainly a real thing, I think it's over-dramatized. By default that means I also agree with how complements map out on the chromaticity diagram.

    If you tweak the white point, you also tweak the complement relationship makes perfect sense to me. If you understand the whole Munsell/CIE Lab evolution story, it's actually a clever way to quantify and summarize a lot of color and light perception stuff.

    ReplyDelete
    Replies
    1. Thanks as always, Lori. You made me dig our my Munsell color tree. It is backwards as well!!

      Delete
  4. I'm jelly you own one, hopefully you can adjust it. Red at 12 o'clock and the subsequent order of hue families creates a lot of confusion. Many expect to see Munsell 5Y/90° at 12 o'clock, not red. If you go down the path of appearance correlates and transformations, AND stay true to how Munsell organized hue families, Munsell 10RP/0° lands at 12 o'clock. As a result, the wheel ends up out of alignment with Cartesian coordinates. #crazypants

    ReplyDelete
  5. Great post John. Ref the comment on the NCS system, my understanding of this is that it is based on organizing colors based on studies of visual perception. Each set of colors on each axis page is based on how people perceive Hue Chroma and Lightness, i.e all the colors on the Y page are the colors that are most perfect Yellow hue, at each of a range of Lightness and Chromatic values. The space between each of these colors is also designed to correspond to human perception of color difference. Hence each step from pure grey to 10% saturation at X lightness 20% saturation at x lightness and so on is also based on visual perception. The range of color in the atlas is not the full visible spectrum, but the range that is achievable with the pigments available to make the colors. However it does therefore "compute" that all the colors of the same lightness and chroma value on the page B should be the natural complement of all the colors on page Y since the atlas is divided into 40 pages.

    ReplyDelete
    Replies
    1. Thanks for the extra information, Unknown.

      I looked up a 1996 paper by Hard, Sivik and Tonnquist which was published in Color Research and Application. The paper describes the psycho-physical experiments that went into development of the colour system. The goal was indeed to create a system that is "perceptually linear", where each step is equal in terms of what we see.

      Thanks for nudging me to look this up!

      Delete
  6. NCS vs. Munsell. Munsell wins. It's far simpler and more intuitive and they way CIELAB correlates is very useful. #justsayin

    ReplyDelete
  7. Hmm. Munsell you say. Sounds German to me.

    ReplyDelete
    Replies
    1. Nope. Albert Munsell was born in Boston, Mass. in 1858. His family heritage goes back to England.

      Delete
  8. In order to consider complementary colors in the context of different illuminants (white points), don't we have to elevate the discussion to Color Appearance Models? Are the CAM coordinates for complementary colors constant?

    ReplyDelete
    Replies
    1. Standard CIELAB does account for changes in illuminant. First, when XYZ values are calculated, there is a wavelength-by-wavelength multiplication by the spectra of the illuminant, which accounts for the physical effect of reflection. Second, the XYZ values are scaled by the XYZ of the illuminant, under the (perhaps dubious) assumption that a pure white is in the field of view for the brain to select as the whitepoint.

      As for color appearance models, let me just say that the Dictionary.com Word of the Day today is ultracrepidarian. This word would apply to me if I were to pontificate on color appearance models.

      Delete
    2. Thank you for your reply. The problem with the CIELAB model is that it is too simplistic for this purpose. I propose that if you take your yellow, find the CAM coordinates, then find your complimentary blue (or purple, or blue-purple, or whatever!) with each of two illuminants using the chromaticity diagram as you did, then you will probably find that each of these complimentary colors translated into their respective CAM coordinates will yield different perceived colors (different from the measured chromaticities). In other words, I actually DO believe what you said when you said, "The complement of yellow depends on the white point." :) I suspect that in your next blog post I may be proven wrong...

      Delete
  9. Very interesting. I am interested in anything that will help me paint like Stephen Quiller...

    I am going to subscribe for now, but I suspect you are too smart for me, so it won't be your fault if I unsubscribe at a later date.

    My simple understanding of complements is that colour fatigues the eye, so when you look at something 'white' afterwards, you see all that is 'not the colour' you were looking at. This remainder must depend on the 'white', so different 'white', different remainder.

    PS I think he original Munsell illustrations (of the colour tree and so on) are tremendous.

    PPS I don't like 'white' text on 'black' background, after reading stuff in this scheme I see text all over the walls of my house. Perhaps blue on slightly darker blue (Commodore 64).

    PPPS Munsell is annoying to put into computer code. When you round hues down, you have to make an exception for 0. For example 2.5 is 2.5R, 0.1 is 0.1R, but 0 is 10.0RP :-)

    Cheers, Steve

    ReplyDelete
    Replies
    1. Your simple understanding is a very good explanation of what I was trying to say! Nauturally, I try to couch things in big words and complicated ideas just to make me sound more intelligent than I am.

      I appreciate the comment on my color scheme. My website is due for an update, so I will change that. Or leave it just cuz it annoys people... I haven't decided yet.

      I will have a chat with Munsell about the comouter code next time I see him.

      Delete