Skip to main content
Participant
Apr 3, 2012 7:49 PM UTC
Question

Is there a script to change layer colors within the layers palette in illustrator CS5?

For example I would like to make my images layer Green and my copy layer Red in my layers palette.

This topic is closed to new replies. Start a new post to keep the conversation going.

12 replies

Inspiring
Apr 3, 2012 7:54 PM UTC

The RGB selected highlight colors?

Translate
Participant
Apr 3, 2012 8:03 PM UTC

In the layers palette whne you create multiple layers each layer is assigned a color by default. I'm looking to change the color for each layer using script. See attched screen grab. I want to change the colors of the layers within the layers palette.

Translate
Inspiring
Apr 3, 2012 8:05 PM UTC

If you have a doc open then you can do this… It will look for a layer by name but you can change that to index or whatever…

#target illustrator

var doc = app.activeDocument;

var lay, layCol;

try {

          lay = doc.layers.getByName( 'Copy' );

          layCol = new RGBColor();

          layCol.red = 255;

          layCol.green = 0;

          layCol.blue = 255;

          lay.color = layCol

} catch (e) {};

Translate