I have some code that generates image of a pie chart. It's a general purpose class, so any number of slices can be given as input. Now I have problem picking good colors for the slices. Is there some algorithm that is good at that?
Or maybe I should just hand-pick and list fixed colors? But how many. Maybe 10 colors and hope there will not be more than 10 slices ever? Also, which 10 colors to pick?
Colors need to follow some rules:
- they need to look nice
- adjacent colors should not be similar (blue next to green is a no-go)
- pie background color is white, so white is out of option
Some algorithm manipulating with RGB values would be a preferred solution.