Get random pixel of a selection

Adobe Community Professional ,
Mar 25, 2021 Mar 25, 2021

Copy link to clipboard

Copied

Trying to see if it's possible to get the pixel location of any pixel within a selection. The selection could be very irregular (think multiple selections across a layer). Ultimately, I'm trying to develop something that would allow me to see what the predominant color used on a given layer is. My idea is to randomly sample a few pixels with the colorpicker and see if one stands out. It would be OK if there was a mismatch; I am fine to return #000 if a candidate can't be found. But maybe there's a better approach that I am not thinking of? InDesign is more my domain expertise than PS. Any thoughts or ideas appreciated. Whatever I come up with (if anything) should be efficient enough to be run as part of a larger processing script for a folder of complex PSDs. Thanks. 

TOPICS
Actions and scripting

Views

251

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Mar 26, 2021 Mar 26, 2021

Likes

translate

Translate

Translate
Adobe Community Professional ,
Mar 26, 2021 Mar 26, 2021

Copy link to clipboard

Copied

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 29, 2021 Mar 29, 2021

Copy link to clipboard

Copied

Sorry for the delayed response, but this will work great. Thank you. 

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 26, 2021 Mar 26, 2021

Copy link to clipboard

Copied

Which purpose is this supposed to serve ultimately? 

What so you mean by »predominant color«? Please post screenshots or sketches to clarify. 

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 26, 2021 Mar 26, 2021

Copy link to clipboard

Copied

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines