Humans love color. In kindergarten, everyone wants to have the biggest box of crayons or the largest selection of colored pencils. The fascination doesn't wane with time. Color carries significance and power, as it affects both the quality and the speed of data interpretation. Colors speak to our senses, calling our attention and creating relationships in our minds. While color is very good for marking identity and highlighting particular elements of a chart, it is very weak when marking magnitude. Color falls low on the perceptual hierarchy of visual cues. Poor choice of color schemes is a problem that bedevils many news graphics. So, when inviting color into your data visualizations, we should take some time to consider how to use color palettes to maximum effect. There are four fundamental uses of color in data visualizations. We can use color to label, to measure, to represent data values, and to enliven or decorate. The types of colors we use and the way in which we use them are quite different for these four cases. To start, consider complementary colors to do highlighting. Located on opposite ends of the color scale, they create a strong contrast when used side-by-side. When placed together, complementary, like emphasis colors, should not be used in large doses, but should be reserved for occasions when you want something to stand out. Analogous color schemes can be selected by choosing colors found next to each other on the color wheel. Analogous colors typically go together well and are pleasing to the eye. But, it is important for us to have enough contrast between analogous colors to provide the clarity the readers need to interpret the visualization. If you have any experience with web design, or with Photoshop or Illustrator to do photo editing or graphic design, you may notice that colors can be represented according to their values in many different ways. Common color models are RGB, CMYK, HSL, and HSV. Here is a brief explanation of these color models. RGB is three values describing a color in terms of combinations of red, green, and blue, with each scale ranging from zero to 255. It's mostly used in digital designs. HEX is a six-figure "hexadecimal" encoding of RGB values. CMYK is four values describing a color in combinations of cyan, magenta, yellow, and black, and is used for anything printed. HSL is three values describing a color in terms of hue, saturation, and lightness. Hue is the position on the color wheel in degrees, where zero is red. Saturation and lightness are given as percentages. HSV is similar to HSL, except that luminance replaces lightness, running from black to a specific color. Humans perceive color in three dimensions. Not the red, green, and blue used to define colors on computers, but saturation, luminance, and hue. Saturation is the intensity of a color and can be understood as the amount of the color that's mixed with white. Intense colors are highly saturated, while earth tones are desaturated. Black, gray, and white are unsaturated. Luminance is a continuum from black to white. It can be understood as the amount of black that is mixed with the color. Hue is what we usually refer to as color. It's vary from red to orange, yellow, green, blue, indigo, and finally violet. Here are three boxes which represent saturation, luminance, and hue. Let's order these colors. We can easily rank scales of luminance and saturation from its lowest to highest value. They are perceptually ordered and are effective to use to represent ordinal data. In contrast, hue has no inherent ordering. It can be used only for representing categorical data. The color scales used to build a visualization depend on several factors, such as the characteristics of the data, the tasks which need to be accomplished, and the target audience. There are three main color palettes for data. Sequential scheme is colors that are ordered from low to high. Diverging is two sequential schemes extending out from a midpoint value. Categorical color palettes is the color scheme that has a lot of contrast between each adjacent color. To choose the best color palettes, we can first consider the types of data that you want to illustrate. Sequential color schemes are best used for ordinal, ratio, and interval data. Sequential colors allow you to order values from low to high using a gradient effect. Normally, we map higher values to darker colors and lower values to lighter colors. Diverging color scheme is used when the values are ordered and there is a critical midpoint, it could be an average or a zero. One of the examples, is interval data that has a meaningful midpoint or ratio data that has a relevant zero crossing. Diverging color schemes use two contrasting hues for endpoints and a neutral color, such as white and gray, for the midpoints. Categorical color schemes are used to highlight categorical data, such as political parties, and require contrast between adjacent colors. However, the number of colors used to represent categorical data should be restricted to around seven, the magical number for short-term memory. This guideline is based on two constraints: user ability to distinguish between colors and their ability to remember the meaning of each color while looking into the visualization. However, there are some problems with using color to represent quantitative information. The first thing we have to pay attention to is the perception of colors. Luminance, saturation, and hue can be affected by the surrounding colors, and it is hard to order different hues. Colors also create artifacts. One more thing we have to pay attention is that shifts in color scales do not correspond well to the change in actual value. Therefore, the best place to use color is for encoding categories. Even in categorical cases, it is good to be careful to choose colors with different hue, saturation, and luminance, so that it can be distinguishable even in grayscale. To apply color schemes to our visualizations, we don't have to create it from scratch every time for every graphic. Many visualization tools suggest color palettes. I often make use of a website called ColorBrewer, which I attached a screenshot here. This platform allows you to choose sequential, diverging, or category color schemes with the number of colors you specify. The website was originally designed for maps, but it's useful for charts in general. These color schemes have been rigorously tested to be informative. Similarly, when we code with Python, there are multiple color schemes built in with the library of Matplotlib or Seaborn. You just need to specify the name of the color scheme you want and apply it to your graphics. Besides considering color types, attention to color names is also important for data visualization. Ensuring that each color used can be clearly named will make it easier for readers to refer to the elements in their conversations. Experimental evidence suggests that individuals can better remember nameable colors. Here are two color naming models to analyze color palettes of ColorBrewer and Excel. Matrices show all the color names listed and how much the names used to describe the palette colors overlap. The bar charts show the salient score, or how uniquely nameable a color value is. We can clearly see that the ColorBrewer palette provides better color salience and minimal name overlap. Palettes from Excel, on the other hand, exhibit higher name overlap and lower salient colors. That suggests a designer should use the ColorBrewer color choices for visualization if there's no other major consideration. When choosing a specific theme of color, we should also pay attention to the emotional values a color conveys. The way we interpret color depends on cultural influence, personal association, and even one's mood. Colors can evoke different emotions. For example, red can be associated with positive feelings like excitement and desire, but also with negative feelings of danger and alarm. One common use for color in data visualization is using red for negative or loss and green for positive or gains. If you were to have a green arrow pointing down to show loss, and the red arrow pointing up to show gains, that would be very confusing. Colors can also be broken into high-level dichotomies such as earth-tones versus unnatural colors. Earth-tones are a mixture of browns and tans, which can include richer colors such as green and orange. They are considered to be assuring and settling. We perceive earth-tone colors as calming, which Edward Tufte has said that these kinds of colors are what you want to use if you just want to use the color very gently on your page. In contrast, unnatural colors jump out at your audience, making them ideal for showing an alert. In marketing, besides using color to make the brand more recognizable, it's also used in the hope to influence consumer decisions. Blue is a calming color. Imagine you are sitting by the ocean on a clear day and stare up at the sky; it gives you a feeling of serenity. The ocean and sky are also mighty and reflect blue. As such, blue logos evoke feelings of confidence, reliability, and tranquility. Technology brands like Facebook and Twitter take advantage of blue colors to convey a message. Green signifies health, growth, and environmental friendliness. In marketing, it is used in stores to create a relaxed feeling. It is associated with wealth. It has long been a symbol of fertility. Marketers use it to attract eco-friendly clients to their store. BP, Starbucks, and Land Rover use this color. Purple is the color of royalty and evokes feelings of glamour and charm. It's often used in cosmetics and anti-aging products. Purple represents an imaginative, wise, and creative brand. Yahoo and Hallmark use this color on their brands. Yellow is the color of the sun. The motto of National Geographic is inspiring people to care about the planet. The color yellow is associated with knowledge and wisdom. As such, it's easy to understand why yellow evokes feelings of optimism, clarity, and warmth. Brands that want to put a smile on the faces of their customers call on the power of yellow. For example, McDonald's golden arches is associated with happiness and yellow is the most visible color in daylight, so that's why a McDonald's sign is so easy to spot on a crowded road. Red can raise people's pulse rates when they look at it. It is a powerful color that is warm, exciting, sexy, and urgent. This punchy color works well in the entertainment industry. Nintendo's logo has a simple font, but the use of red makes it stand out. Coca-Cola takes advantage of red's welcoming allure. The brand's logo coupled with their company's advertising makes their drink into something that calls to mind positivity and affection. Since colors evoke emotion, all of us consciously or subconsciously associate certain topics, locations, foods, or other objects with the concept of color, making them more accessible and memorable. It helps signaling conventions in society. Just take for example how we use traffic lights to regulate our drives. Colors are used to represent a political stance or ideology. In the United States, red generally identifies conservatives and blue identifies liberals, but this convention wasn't nationally used until the election of 1992. In fact from 1972 until 1988, the trend was reversed with Democrats red and Republicans blue, with some exceptions. Color is also used to represent political parties in the United Kingdom. In fact, color is so important in politics that they are often used in place of a title. "Yellow politics" is used to describe liberalism, "going green" for environmentalism, and red for socialism. When creating a visualization to illustrate the composition of the House of Commons, each dot, which represents a seat, is encoded with the symbolized color of the political party. Another example is the awareness ribbons. The use of various colored ribbons is designed to create public awareness to health, medical conditions, and other issues. Today, the pink ribbon is a strong symbol of breast cancer awareness and the fight to find a cure against the disease. It is used all over the world, bringing emphasis to the cause across countries, cultures, and languages. Now, look at these two circles. Can you see the characters within the circles? The number two and letter w. People with color blindness and deficiency would have difficulties distinguishing all of these shades of color. Color vision deficiency is a condition where a person's eyes are unable to see some colors in normal situations. People with color vision deficiency have difficulty detecting some color pairs. One of the worst pairs of colors is Christmas colors: red and green. Around eight percent of men and 0.5 percent of women globally have red-green color deficiency. My brother is one of them. Our family found that out when he had trouble distinguishing the red and green light on traffic lights. And when cooking, he couldn't tell whether his piece of meat was raw or well done. Here, the apples on the right show how different color blind people see compared to a person with normal color vision. But there are many well-known people that also have color deficiency. For example, Facebook's main color is blue because Zuckerberg has a red-green color deficiency. In an interview, he told the reporter that blue is the richest color for him. He can see all the blue. As a designer, we should design with color deficiencies in mind. We can leverage this by making sure to have additional visual cues to set the important number apart. Consider also using bold, varying saturation or luminance. There are a number of sites and applications with color blindness simulators that allow you to see what your visual looks like through color blind eyes. For example, ColorBrewer and ColorOracle. Choosing a color scheme is a complex science and art. It can make or break your visualization. The technical best practice is to use color according to data types, use only a few colors, color should be distinctive and named so readers can communicate and remember the color easily, strive for a color harmony, try to use natural colors, use cultural conventions and meaningful associations, and be sensitive to color blindness and vision deficiencies. A carefully selected color palette helps you to harness the pre-attentive processing powers of the human brain and makes insight clearer and easier to find. A badly chosen color palette obscures the information users need to understand and makes your visualization less effective and harder to use.