No random color

 From:  Michael Gibson
4517.2 In reply to 4517.1 
Hi Pilou,

> How to change it for have for example var blue= 13, then
> var blue = 15, then var blue = 17 etc for have no random color
> and of course same for red and green for make some controled gradients :)

Well, that particular script that you showed there assigns random colors to every existing style.

Meanwhile what you are describing here is pretty different from that - if you want to create a gradient or something that kind of means that you would be working on some particular number of styles, I guess maybe creating some specific number of new styles rather than manipulating the existing list of them?

Anyway I would need more exact information on what you would want such a script to do.

> PS A script who create 100 styles ? for avoid to type some keys :)

Here's one that will do that:

script: /* Add 100 styles */ for ( var i = 0; i < 100; ++i ) { var style = moi.geometryDatabase.addStyle(); = 'Style ' + (i+1); }> And something for load a palette of color?

Load a palette of colors from where - from an image? From a text file? This may be getting to a level of detail where I won't be able to create it for you directly, but I could try to help you if you want to write some more complex scripts like this yourself.

One thing that would help a lot though is if you were much more detailed in planning exactly what the script should do.

- Michael