Skip to main content
brian_p_dts
Community Expert
Community Expert
March 26, 2021
Answered

Get random pixel of a selection

  • March 26, 2021
  • 3 replies
  • 650 views

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. 

This topic has been closed for replies.
Correct answer Kukurykus

Apr 03, 2018

3 replies

c.pfaffenbichler
Community Expert
Community Expert
March 26, 2021

Which purpose is this supposed to serve ultimately? 

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

Kukurykus
KukurykusCorrect answer
Legend
March 26, 2021
brian_p_dts
Community Expert
Community Expert
March 29, 2021

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