Select Page

2.11 Color Adjustments


Up to this point, nearly all of the graphs shown in this chapter were built with the default Seaborn color schemes.  

You have probably noticed that when a plot with two categorical variables is built in seaborn, the variables are depicted in blue and orange, respectively.  The contrast between those two colors is particularly helpful for colorblind viewers, who may struggle to differentiate between shades that are less distinct from one another.  

With any type of audience in mind, we should be mindful of the colors we choose.  Color choices on graphs can be impactful.  Particular colors can have calming, soothing effects, whereas others invoke feelings of passion and excitement.  These can vary from culture to culture.  In Western cultures, for instance, blue is often seen as stable and dependable.  In some other places, however, certain shades of blue connote death and sorrow.6 Brands may also be associated with certain colors. For instance, Samsung is associated with blue because of its brand logo;7 the French telecommunications company Orange is associated with, well, the color orange8 so identities such as these will need to be reflected in the data visualizations.

Seaborn and matplotlib can support any hexadecimal color value.  Hexadecimal values are often denoted first by a pound sign (a.k.a. hashtag), followed by a sequence of six alphanumeric values.  For example, Plascon Lobster Red is denoted by #CC2c18.  Because these colors are often used, and because they add so much customizability to Python-built visualizations, we will use the next section for a ‘deep-dive’ into their meaning.  


6 https://summalinguae.com/language-culture/colours-across-cultures/

7 https://www.samsung.com/us/about-us/brand-identity/logo/

8 https://boosted.orange.com/docs/4.3/about/orange-brand/