From: Joerg Lehmann <joergl@us...>  20060621 07:56:22

On 20.06.06, John Owens wrote: >  Joerg Lehmann <joerg@...> wrote: > > > > 1) The one you state above; I'd advocate possibly doing a gradient > > > between the first and last color of the most detailed palette entry > > > (so if a palette had discrete colors for 310 colors, use p[10][0] > > > and p[10][9]). > > > > > > 2) What happens if you don't define enough colors? For instance > > > most of the colorbrewer schemes only start defining at 3 colors > > > (there's no 1 or 2 color schemes). In that case if I needed only 2 > > > colors I'd want to take the first two elements of the least detailed > > > palette entry. > > > > In some way your questions show that the concept becomes indeed a bit > > shaky. > > Well, to be fair, with any discrete scheme this would come up. The > first question is "is it useful to have a discrete scheme indexed by > total number of colors and by color number?" No surprise that I think > the answer is "yes"; When posting my initial scheme, this was also obvious to me. On the other hand, it's not what a color palette usually means: an ordered collection of a finite number of colors. But we could reconcile these two pictures of a palette as described in my other mail, but considering the trivial mapping [[c11], [c21, c22], [c31, c32, c33], ...] > [c11, c21, c22, c31, c32, c33, ...] > I think Dr. Brewer's research shows that color > selection in general, and her schemes in particular, are > generally useful for understanding. Then if you want to support such > a discrete scheme, you have to handle the cases when you haven't > defined colors. The question then is "do you leave that up to the > programmer" or "do you handle it in some reasonable way within the > programming system", and I'd argue for the latter in the way I described > above. This is something which has to be discussed (try import this and look at line number four, counting empty lines). The needed input would be:  how many variants does a given scheme typically have?  can the fallback behaviour in the case of a variant not exisiting for the given total number of colors be well defined, i.e. how implicit would the choice be? Jörg 