Some Tips on Color Accessibility
I thought I'd write a bit about accommodating color blindness in scientific data visualization (plots and the like). The truth is, there are many who know far far more about this than I do. For example, I know nearly nothing about color theory or the physiology of color blindness. However, I do know a few useful practical nuggets that the reader might find beneficial.
Before we get to these tips, though, let's talk
about the motivation. Consider this: In an audience of 8 men and 8 women,
chances are >50% that at least one has some degree of color blindness. In science,
unfortunately, your audience is more likely to be male-skewed. Men are about
20x more likely to have some degree of color blindness, so the prevalence of color
blindness among scientists is likely also enhanced relative to the gender parity
assumption.
The Tips
First, when in doubt, simulate. Upload your
image to the Coblis simulator (https://www.color-blindness.com/coblis-color-blindness-simulator/)
and you can see an approximation of how your image would appear to people with
each of several different types of color blindness. Personally, I found this
tool extremely helpful... but at first, quite frustrating. My carefully-crafted
plots were all "ruined" by this simulator! In reality, I wouldn't have been
frustrated if I'd gotten off to the right start and considered color
accessibility from the beginning, which is the focus of my next tips. By the
way, here's a useful table from Wikipedia showing the prevalence of different types
of color blindness, each of which is simulated on the Coblis simulator
(complete with "citation needed" warning):

Second,
plan your colors to be accessible from the beginning. One popular palette
(collection of discrete colors) that is generally accessible is the Tableau
Colorblind 10:

If
you happen to use matplotlib in the Python programming language for your data
visualization (as I do), this palette is conveniently available as "tableau-colorblind10".
Recently, I found myself in need of a larger palette with fewer grays. An
Internet search ultimately led me to this:

Some more useful palette can be found here: https://venngage.com/blog/color-blind-friendly-palette/#4
Third, try to avoid relying on color if you can help it. There are two ways to go about this. In one strategy, using different patterns or markers can make the patches or curves or points on your plot easily distinguishable, regardless of their color. In another strategy, different brightness levels likewise will make your data visualizations more accessible.
Fourth, when you need a color ramp, consider
using cubehelix. Before I get into cubehelix, let me explain what I mean by
color ramp. A color ramp is a progression of colors that corresponds to some range
of values. Keying each elevation in a topographic map to a different color is one
example. Color ramps do not lend themselves to the second tip. They may require
more than 15 different values, and even more critically, those values must have
a clear, intuitive progression. In our topographic map example, we want points
at similar elevation to have similar colors in some sense. This goal is almost the
opposite of that which guides palette design, where we often desire for each
color to be distinct from all the others. The part of the third tip that
concerns patterns is also not especially helpful. Although we could use different
patterns (stippling, hashes, etc.) so as not to rely on color only, these become
a problem if we want precision. Precision requires visualizing many different values,
but subtle changes in, say, point density in a stippling pattern can be hard to
discern. These patterns can also make color ramp visualizations appear busy and
intimidating. However, the second half of the third tip is useful here:
different brightness levels. Here is where the cubehelix technique comes in.
Dave Green (https://www.mrao.cam.ac.uk/~dag/CUBEHELIX/)
developed cutehelix for visualizing astronomical data. In it's classic form, it
simultaneously ramps from black to white and across colors. The reason for the "helix"
part of its name becomes clear when this progression is plotted in 3D color
space:

The result is a color ramp that unambiguously communicates a progression from dark/cold to bright/hot:

Even better, this progression works for all sighted folks, because brightness levels encode the same information as colors. Beyond the classic version of cubehelix, the algorithm can produce many color ramps when constrained by various parameters. In Python, the seaborn module provides a function to easily generate such cubehelix color ramps tuned in many different ways: https://seaborn.pydata.org/tutorial/color_palettes.html.