For sequential palettes this is not essential since we have viridis. But for diverging palettes
this is quit essential.

The diverging palettes are
BrBG PiYG PRGn PuOr RdBu RdGy RdYlBu RdYlGn Spectral
And also cool_warm. The cool_warm palette is based on Kenneth Moreland's proposal (see ref).
It goes from blue (cool) to ref (warm), based on well thought-out design elements.

Arguments

n

the number of colors (>= 1) to be in the palette.

Value

A character vector of color names.

References

* Moreland, Kenneth. "Diverging color maps for scientific visualization." Advances in Visual Computing (2009): 92-103.
url: http://www.kennethmoreland.com/color-maps/
The code was provided here: http://stackoverflow.com/a/44073011/256662
Thanks to the user YAK, who relied on the code from the Rgnuplot package
(which is duplicated here, in order to save the need to import the entire package)