As a young grad student, I was deeply annoyed when I was asked to think about what color I was using in my graphs. My thought was "The colors are distinguishable, therefore I have hit diminishing returns and will spend my time on other things." I now see this as understandable but flawed thinking. If you are a scientist in training of any kind, you are also a graphic designer and writer in training. This surprises lots of new grad students in STEM subjects every year. However, scientists and engineers are not trying to be breathtaking, original graphic designers. You just need functional graphics and as a result, time spent developing a well-tuned eye for color is a redundant human effort. This article is a collection of all the helpful resources on color use I have come across.
When the colors selected need to denote categorically different things, a number of people have worked out ways to do that so you do not need to waste a lot of time picking out colors yourself. You just need to know where to find appropriate style guides.
Paul Tol has written a lot on this topic.
D3 ordinal colors has several aesthetic palates to choose from.
Matplotlib has some named colors and the tableau color palate is published there.
Material Design by Google is a tech giant's attempt to help with the color selection problem.
The Sunlight style guide for data visualization also has some options which are good for low complexity data (where 2-5 colors are sufficient).
Wes Anderson's movies have inspired a blog of color palates which may be of interest.
I used the viridis color map because it is the most perceptually uniform color map I am aware of. Jet is the default colormap in many applications. MatLab, the ubiquitous computational software of math and engineering, used jet as the default colormap for many decades. Jet is most famous for being a fantastically bad colormap. Physicians who use jet in diagnosing heart disease take longer and make significantly more errors than those who use decent colormaps  (at the time of that paper, viridis had not yet been invented so viridis was not used in the comparison). This is a bit of a pet-peeve of mine but jet (or "rainbow" as it is sometimes referred to in literature) is an extremely poor colormap and better options are available [6,7,8]. People have known about and ranted about jet's deficiencies for over 20 years [9,10,11,12,13] and yet here we still are in a world of rainbow-colored non-sensical data-visualizations. Even MathWorks, the authors of MatLab and the organization arguably most responsible for this plague, has now written publicly about the deficiencies of jet without so much as a halfhearted defense of it . For more information on how color processing works and how to evaluate colormaps, see .
The replacement for jet or rainbow colormaps is viridis. It is a brilliantly designed, perceptually-uniform colormap . Nathaniel Smith, Stéfan van der Walt, and Eric Firing, the inventors of viridis, make a wonderful and entertaining case for it on youtube.
Applying a potential colormap to a human face is the simpliest published test of perceptual uniformity. If the face looks natural, the colormap is probably reasonable . In the graphic below, we are comparing jet to the five perceptually-uniform colormaps native to matplotlib (viridis, plasma, magma, inferno, and cividis).
 The Visual Display of Quantitative Information, 1983.
 Envisioning Information, 1990.
 Visual Explanations: Images and Quantities, Evidence and Narrative, 1997.
 Beautiful Evidence, 2006.
 "Evaluation of artery visualizations for heart disease diagnosis," IEEE Transactions On Visualization and Computer Graphics, vol. 17, pp. 2479—2488, 2011.
 "True colors of oceanography: Guidelines for effective and accurate colormap selection," Oceanography, vol. 29, pp. 9—13, 2016.
 "Somewhere over the rainbow: An empirical assessment of quantitative colormaps," Proceedings of the 2018 CHI Conference On Human Factors in Computing Systems, pp. 1—12, 2018.
 "Optimizing colormaps with consideration for color vision deficiency to enable accurate interpretation of scientific data," PloS One, vol. 13, pp. e0199239, 2018.
 "How not to lie with visualization," Computers in Physics, vol. 10, pp. 268—273, 1996.
 "Rainbow color map (still) considered harmful," IEEE Computer Graphics and Applications, vol. 27, pp. 14—17, 2007.
 "Data visualization: the end of the rainbow," IEEE Spectrum, vol. 35, pp. 52—59, 1998.
 "The Rainbow color map," CERN, 2015.
 "The end of the rainbow? Color schemes for improved data graphics," EOS, vol. 85, pp. 385—391, 2004.
 "Rainbow color map critiques: An overview and annotated bibliography," MathWorks Technical Articles and Newsletters, vol. 25, 2014.
 "A survey of colormaps in visualization," IEEE Transactions On Visualization and Computer Graphics, vol. 22, pp. 2051—2069, 2015.
 "The "Which Blair Project": a quick visual method for evaluating perceptual color maps," Proceedings Visualization VIS'01, pp. 183—556, 2001.