Sg2.9
Script to change each object...
Recent RSS
Script to change each object in a selection's color
From:  Ronald Stepp
Date:  31. May 2013, 02:23

I'd love to find a script that after I select a number of objects and run the script, it acts like I used the eyedropper tool in the center of each object in the selection to change the fill color to the color in the layer below it.

Example: I have an image on Layer 1 with lots of colors, ie, city, jungle, whatever.

In the next layer up I have a grid of rectangles, I select them and run the script. It changes each rectangle's fill to whatever color happened to be in the center of each rectangle in the image layer. As if I had selected the eyedropper tool and clicked inside each rectangle.

I've looked and looked and am not sure if I am just not using the right search terms.

Any help would be appreciated. I am using CS5.

Re: Script to change each object in a selection's color
Date:  4. June 2013, 21:23

Try the script
Object Raster Colour

Scale the image so not too many pixels
Place it
Rasterise it
Create a rectangle ( you don't need the grid of rectangles )
Select both
Run the script

Not quite what you ask for but will turn images into rectangles.

It scales according to the brightness so if you want pale green rectangles to be the same size as dark green, you would need to turn off the scaling in the script.

If it's close to what you want, someone here would be able to make that change.

Gareth

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
Hexagonal Rasterizer 02.03.14