16 roughly distinguishable colours
If you're colourblind like me, distinguishing colours is pretty tricky, especially if they all have to be dark and not look totally horrible. This comes up if you use colour to help tell apart nicknames on IRC at a glance, where the more colours you have at your disposal, the better.
After a few hours of fiddling, using python to generate the colours and test output, I came up with the following colours:
#892929 #c36d3a #897129 #9da030 #598929 #37ac33 #227236 #2c956e #257e7e #3787b7 #304ca0 #503dce #52257e #bc3dce #a03084 #b73767
Here's a graph of them:
Angle (0-360°) represents hue and distance from the origin represents value in HSV colour space; all points have saturation 70%.
I started with 16 points distributed with 4 in an inner circle (V=0.5), 4 in an outer circle (V=0.8) and 8 in a middle circle (V=0.65), then played with the precise hues and values. I ended up darkening the greenish colours since they appeared too light otherwise. I also had to manually push around certain similar-looking colours.
Feel free to try them in your IRC client or for some other purpose.