Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

Select/Change Certain Color

$
0
0

Hello,

 

I have been scripting in various Adobe products for a while but I am simply stumped on this one.

 

I have a series of PNG files that consist of various shapes. The shapes are solid black and the rest of the document is transparent.

 

I wrote a script to pull all the documents into one new Photoshop file and place each file/shape on its own new layer.

 

I then randomize the order of the layers. This in theory generates kind of a unique "pattern".

 

What I want to do now is change the black pixels of each layer to a different color.

 

For example, all the black pixels in layer 1 will be changed to red. All the black pixels in layer 2 will be changed to green, etc, etc.

 

Since the black PNG shapes are randomly placed in different layers, this will again give a very unique and colorful pattern.

 

I am good up to this point. However, I cannot figure out how to change the black pixels to a specific color using the scripting interface.

 

I thought of selecting only the black pixels and then filling with a color. Couldn't figure out how to do that. Thought of applying a color shifting script. Couldn't figure out how to do that. I even thought of apply a style or filter. Couldn't figure out how to do that either.

 

Any help or suggestions or examples would be greatly appreciated.

 

Thank you!


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>