The above redefinition of \sectioncolor using \ifcase implies manually feeding the colors in the \ifcase construct. What I would like to achieve is to have a command, say \ColorList, having as argument a comma separated list of variable length containing the colors to be used, and then redefine \sectioncolor to use the colors of the list depending on the section counter. So for example, referring to my sample code, using

I find that \ColorList{yellow} (ie, with only one member) fails. I don't know how important this is. Anyway, I have eked out a patch but I don't feel qualified to edit your answer.
–
Ahmed MusaApr 28 '12 at 23:36

@AhmedMusa thanks I fixed it (I hope) for {yellow} and {} edge cases.
–
David CarlisleApr 29 '12 at 0:20

ConTeXt provides \defineconversion and \convertnumber commands which cycle through the list of elements (or applies a macro to the number). This is useful for things like footnote markers (\dagger, \star, etc.), but can be easily overloaded for other tasks as well.