Mike Cisneros has some guidance around color selection when designing visuals:
Regardless of how you select it, this key color will be used to denote the data points, or the data series, on which you feel it is the most important for your audience to focus.
All of the other colors we use will be based on where they are on the color wheel in relation to this key color, how many colors we intend to use, and what kind of relationship the rest of the data has to the data represented by the key color.
I’ll admit that I just reach for the pre-created palettes which have done the work for me already.