I am trying to visualize a problem I am working on. For this, I need $n$ distinct colors which are preferably easy to distinguish. (Obviously, the higher the $n$ is, the harder it is to distinguish the colors.)
I was using the ColorData["index","ColorList"]
. However, through a crash of my procedure, I found out that the number of colors in the schemes is limited. The documentation on different ColorList
s is not very extensive, so with simple loop I found out that the maximum number of colors in a scheme ranges from $4$ to $21$. It is however not straightforward to see how many colors are in each scheme. Note, for $n = 5$ it is not optimal to use selection of $21$ colors.
For given $n$, is there a simple way to get color sheme with $n$ easy to distinguish colors?
Colorize
, because after all this color scheme is designed to be used in this way: Colorize color scheme. If n is not < 30 you need to create your own color function. $\endgroup$