Key Principles for Choosing Categorical Colors

  1. Is there enough contrast? Can we actually see the data?

    • Sometimes the contrast of the color against the background is so weak that it is difficult to see
    • This problem can be exacerbated when printed to paper or displayed in a different media format
  2. Are your colors easily distinguishable?

    • Color blindness: To use colors that are distinguishable for all viewers, we must make sure our graphs/figures are clear for those who are color-blind

      • Color blind individuals can have a tough time distinguishing reds and greens, so we should be careful when utilizing these "Christmas colors"
    • Media: will our visualization be viewed online (mobile or desktop)? In print (color or greyscale)?

  3. Do you have too many categories/colors?

    • General rule, the fewer the categories/colors, the easier your visualization becomes to understand
    • More than 5-7 colors? —> you should ask —> How can I reduce the number of categories?

Practical Tips for Categorical Colors

  1. Print your figures

    • Regular print: Controls for many issues with contrast when and a figure is translated to a professional setting
    • Printing in greyscale: this helps control for even more situations like color blind viewers and if someone transfers your visualization to a new format (like greyscale)
  2. Use services that pick colors for you

    • scicolor: a Python package for selecting a handful of color maps that make it easy to return color maps for specific types of data. This package was created by Kaicheng Yang.

Principles and tips taken from Yong-Yeol “YY” Ahn's Data Visualization course.