One important question to consider when using color to represent categorical information is, how many distinct values can we actually perceive? How many values that vary across different use? Because we just saw that using different color use is a very important principle when you are using color for categorical information. So, how many distinct values can you use? Well, it depends a lot on context as we will see in a moment, but in general, the estimate is between five and 10 different distinct codes. You can't really go past beyond this value. So, in general, I think the answer is very few, and it's very important to keep these in mind. When you are using color to label data, don't try to over do it. It's going to work really well if you have four, five, six categories, maybe a little more, but as you go past this threshold, it starts getting really, really hard for the person reading to distinguish these colors. They start blending together. So, that's a very important principle in visualization design. An interesting element here is that some of the colors that we can distinguish best are those that are suggested by the opponent-process theory that we introduced before. So, red, green, blue, yellow, white, and black are very special colors. Since they are at the spectrum of this perceptual scales, they tend to be distinguished very, very, very well. We can, of course, also distinguish more than that if we want. A very interesting piece of research is presented here. So, these image comes from a research paper published in the 80s by Post and Greene. What these researchers try to do is to show a whole spectrum of colors and see how people would name this colors, and then figure out which regions in this diagram would be named consistently. As you see, it goes a little bit beyond four or five colors, but it's not much more. So, people can readily label green, yellow, orange, red, pink, purple, white, aqua, and blue. So, that's also a very good research results that can be used to inform a visualization design. Colin Ware, who is a visualization and vision scientist researcher, who actually wrote one of the best data visualization books out there, I would say the best visualization book in terms of connecting vision science with visualization, proposes in his book a color palette of 12 colors. They are mostly based on the study that I have just shown you and some other pieces of information. So, this is a useful resource. But again, as you can see, you can't really go past beyond a few different colors. These colors are also been selected because they are the colors that are consistently named across different cultures. So, it doesn't matter the culture you're in or the culture in which these colors are tested. People are able to assign unique names to all of these colors, which of course makes this palette particularly strong and robust. So, let's talk about color conventions and semantics. When using color, you may be tempted to use some specific shades because they have semantic association. So, typically, one of the most common is red communicates danger, or bad, or alert, be careful, and green tends to be okay, good, and so on. But you have to be careful because these conventions are not necessarily universal. So, when you design visualizations that rest upon some semantic associations, you always have to be careful and think about who the readers are going to be, whether this can be confused or not. So, there are some positive and negative aspects of trying to use color in a way that there is some sort of semantic hook associated to them. So, I would say that the positive side of using semantic associations is that they would be very intuitive. So, a person reading the visualization that uses this semantic encoding would probably not need to read a legend, for instance, in order to understand what is going on. On the other hand, they can also very easily confusing, especially across cultures. So, it's a balancing act, and you have to be really, really careful there. Sometimes, if used appropriately, they can be extremely powerful. But if not, they can damage the comprehension and intuition of the chart. One special color that we have, that has a very interesting semantic association is gray. So, shades of gray tends to be perceived as being colors that have no shade, no color in some sense. Because of that, typically, the semantic association that we give to any element in a visualization that is gray is that it belongs to an unspecified class or category, and sometimes this is as useful tool. So, let me show you an example. So, this is a chart created by visualization designer Moritz Stefaner, and it shows the evolution of child mortality over time for a number of different countries. But as you can see, in this chart, there are only two countries that are actually colored with some color, and the rest is gray. So, the idea here is that since most of the countries are colored as gray, they are perceived in this particular chart as not important and not classified with anything. As I said, sometimes is useful to use gray with this purpose. Say, if you have a given dataset with four or five classes, but one of these classes actually does mean uncategorized, you may want to associate the gray color to the class uncategorized. So, it's a very powerful tool.