Select all pixels in image by specified rgb value in action? Or script?

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: xbytor, DavideBarranca, Paul MR

moorea21
Posts: 1
Joined: Sun Mar 19, 2017 4:08 pm

Select all pixels in image by specified rgb value in action? Or script?

Postby moorea21 » Sun Mar 19, 2017 4:21 pm

I'm used to creating actions in PS5.5, and scripting in other (non adobe) programs, but I've never used scripting in PS, so I'd like to achieve this through actions if possible.
Beginning with a 63 colour indexed image, converted back into rgb, I'd like to automaticaly seperate the image into layers where each layer has 1 of the 63 colours on it.
I can do this to some extent with an action, but the actual selection of each colour has to be done manually with the magic wand tool.
Seeing as the 63 colours are always the same rgb values, I ought to be able to automate this further by specifying in script/action which rgb values to select.
Is this possible with actions? If not, how can I call a script from an action?
If I have to script this, what should I google in order to find the relevent information? I often find that not knowing the correct technical term can scupper any search attempts...
Thanks.



iMatt
Posts: 3
Joined: Fri Sep 22, 2017 8:13 pm

Re: Select all pixels in image by specified rgb value in action? Or script?

Postby iMatt » Fri Sep 22, 2017 8:19 pm

Hi There-
You may be able to do this with an action using Select>Color Range... Rather than using the magic wand. When recording color range the action records luminance values rather than click coordinates—which is what magic wand does. Since all 63 colors are always the same you can record a color a range selection for each color to get the desired selection, and then copy that selection to a new layer. Hope that helps.


Return to “Photoshop Scripting - General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest