Skip to main content
Participant
March 8, 2022
Question

How to get (pick or otherwise see displayed somewhere) the color with the highest pixel count?

  • March 8, 2022
  • 4 replies
  • 210 views

Hey hi there,

 

Been looking online for a while, asked customer reps, nobody seems to know. How do you get (pick or see displayed somewhere) the color with the highest pixel count in any given photograph?

 

I'm not talking about the median, nor an average, but simply the color with the highest pixel count–not its chromatic components–but just the color.

 

The idea is to derivate some color palettes from photos, if it's a photo of the sky with a thousand different blues in it, I want to know which blue covers the most pixels in the image.

 

Thanks a bunchers,

 

–Javier

This topic has been closed for replies.

4 replies

jane-e
Community Expert
Community Expert
April 15, 2022

 

if it's a photo of the sky with a thousand different blues in it, I want to know which blue covers the most pixels in the image.

By @javier ar32557083

 

There might be faster methods, but one way might be to export as a .gif and start reducing the colors.

 

 

 

 

I cropped this image heavily, then noticed they both had blue hats. On th second pass I selected that blue and trashed it.

 

The buttons on the bottom will let you make a selected color transparent, web-safe, locked so it won't be dropped, trashed, or added from the eyedropper.

 

The eyedropper is on the left.

 

Jane

 

 

 

 

 

c.pfaffenbichler
Community Expert
Community Expert
April 16, 2022

Nice approach! 

 

Like @melissapiccone I wonder about the »endgame« – would this have to be »batched« for many images quickly, what is the ultimate output need (swatches, txt-file/s, …), …? 

melissapiccone
Community Expert
Community Expert
April 15, 2022

Have you changed the options in the eye dropper? I use 3x3 average but you can change it to whatever you want. I don't think I understand the end game - what do you want to result for?

Melissa Piccone | Adobe Trainer | Online Courses Author | Fine Artist
c.pfaffenbichler
Community Expert
Community Expert
April 15, 2022

Did you make any progress on this? 

c.pfaffenbichler
Community Expert
Community Expert
March 9, 2022

Well … depending on the noise the RGB-color with the highest pixel count might not be that relevant. 

 

A scripting solution seems possible, iterating the Color Picker is slow, though; I think I have seen approaches using the Lab in RAW that would be faster. 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/how-to-get-list-of-all-colors-in-an-image/m-p/7499014