On 19 Feb 2014, at 11:37, Alan BRASLAU <alan.bras...@cea.fr> wrote: > uniformdeviate returns a random number between zero and the value of > the argument. So you do not want (uniformdeviate i).
Ah, that explains it. Thanks a lot Alan! Otared Kavian wrote: > One way is to increase the « degree of randomness » by saying > withcolor transparent (1,0.3,mycolor[round(uniformdeviate(10*i)/10)]) > or you can define a RandomColor as below: I hate myself for not knowing more about math! I don’t see how mp picks its random numbers - when I recompile, I always get the same colors in the same order. They are “random” in the sense that there is no fixed order, but I was surprised that every run produces the same random order. RandomColor is nice, but not for my current purpose because I want to choose from a fixed list (colors are used as backgrounds, so I can only use dark colours, e.g.). Thanks a lot! Thomas ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________