This is really more of a question to satisfy personal curiosity than to solve a real problem.
When choosing the colour schemes for my plots, I try to select colours that will work well with the amount of items involved in the plot. This means using sets of colours that are above all aesthetically pleasing, but also that contrast well, etc. (eg. schemes created with a website like this).
However, I was wondering if it would be possible to define a set of 2,3,4,...,n colours that work well, and have pgfplots (or some other package?) select automatically from the one that matches the amount of entries.
I looked around for similar questions, but I didn't seem to find anything. The colour sets could be defined as cycle lists, but it's the automatic selection that I'm wondering about. Can this be done? Any ideas?