Hi John,
Replying to myself:
> The new palette will look like
>
> class palette(attr.changeattr):
> """color palettes
>
> A color palette comprises multiple discrete, ordered collections of
> colors"""
>
> def __init__(self, colorlists):
> """ initialize the color palette with colorlists
>
> colorlists is a list of list of colors, with len(colorlists[i]) =
> i+1"""
> self.colorlists = colorlists
>
> def select(self, index, total):
> return self.colorlists[total-1][index]
I somehow misunderstood your use-case (as André immediately pointed out
to me). So in fact the new interface for palettes will be even simpler:
class palette(attr.changelist):
"""color palettes
A color palette comprises multiple discrete, ordered collections of
colors"""
pass
palette.threegreys = palette([grey.black, grey.grey(0.5), grey.white])
Jörg
_______________________________________________
PyX-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-devel