Leif K-Brooks wrote: > Gabriel Genellina wrote: >> Try this. It first chooses 0, 1/2, then 1/4, 3/4, then */8... >> It's the best I could make if you don't know the number of colors >> beforehand. If you *do* know how many colors, your previous response >> is OK.
I've no better suggestion than either of you, _but_ note that in choosing colors for keys it is generally considered better ergonomics to vary more than simply the hue if you don't want to penalize the colorblind. Consider varying the other two parameters simultaneously (perhaps in restricted ranges and varying orders); the contrast may be more substantial even to a viewer with full color vision. -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list