Auto color selection PIL

Scott David Daniels scott.daniels at acm.org
Sun Oct 1 15:51:46 EDT 2006


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
scott.daniels at acm.org



More information about the Python-list mailing list