The Art of Color: The Subjective Experience and Objective Rationale of Color
http://www.amazon.com/Art-Color-Subjective-Experience-Object...
The Elements of Color: A Treatise on the Color System of Johannes Itten Based on His Book the Art of Color
http://www.amazon.com/Elements-Color-Treatise-System-Johanne...
For starters, there won't be any easy algorithmic way to defines shades and tones of colours (shade is the term for mixing a colour with black, tone is mixing a colour with white) as the eyes perceive them all a bit too differently, so they will all require some hand tweaking.
When users can choose colours, try and keep any preselected colours neutral. Blacks, whites and greys. Sometimes a slight blue can be applied. Blue is universally the easiest/most agreeable colour.
For finding good color combos the major ways to go about it are to either pick color chords and tweak slightly, or to play with the hot/cold contrast.
Color chords means using 3 or 4 colours which are equidistant on the HSL wheel (90 or 120 degrees apart), you can then play with them a bit to see what you like.
Hot cold contrast just means that warm colors and cold colours always look good against each other. So red/orange/yellow against blue/violet.
Also worth noting that different colours have different weights. Yellow is perceptually bigger than purple. So if you have two equal sized dots, one yellow one purple, the yellow will appear larger.
Most of this comes from The Elements of Color https://www.amazon.ca/Elements-Color-Johannes-Itten/dp/04712... . Im sure many other books cover it but this one is considered a classic.