Simultaneously averaging colors within multiple selections

ME
Posted By
Mark_Everett
Dec 1, 2006
Views
426
Replies
5
Status
Closed
The thread subject is a little confusing and it’s also not necessarily what I’m trying to achieve — in other words, if someone can think of another way to achieve the effect I’m after, I’m happy to accept any method.

Here’s what I’m trying to do:

Image a layer with a smooth gradient that goes from yellow to red. Now imagine making a number of small selection on the gradient. Ok, now I want to be able to fill each of those selections with the averaged color contained in it, so that instead of a gradient, there’s now a different solid color in each selection.

I could probably figure out how to do this by hand with a small number of selections. But I’m going to be dealing with a large number, so I need different way to do it.

Another point: I’ve been referring to these as ‘averaged colours’, but it doesn’t have to be that exactly. I don’t mind if I end up with something approximating that, or with just the dominant colour. The important thing for me is to end up with each selection containing a solid colour which is related to the original mix of colors it contained, and to be able to do it automatically.

If anyone can come up with any way of doing this, or offer any hints, whatever the approach, I’ll be very grateful.

Many thanks
Mark

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

P
Phosphor
Dec 1, 2006
Look in the Blur category in your Filter menu.

Do you see the "Average" filter there?

This is the the filter you’ll want to use. (If you don’t see the "Average" filter, you’re working in an older version of Photoshop).

Now, then, it’s a matter of how you’ll isolate each of those small selections to which you’ll apply the Average filter.

I’d say "CTRL + J" to put a copy of each selection on its own layer.

A CTRL + Click will select just the pixels on each layer, to which you would then apply the Average filter.
ME
Mark_Everett
Dec 1, 2006
Phos…
Thanks for your reply. The problem is, when I say I’m dealing with multiple selections, I mean 100s. I therefore need to find a smarter, less work-intensive, less hands-on way of doing this. It’s possible the average blur filter could play a part in the process, but it’s also possible there’s a way of approximating its effect, which is all I really need.

If you’ve got any other ideas I’d be very grateful to hear them. Thanks again for your reply, I appreciate you taking the time to respond.

Mark
P
Phosphor
Dec 1, 2006
Are you making the selections manually? What kind of selections? Simple rectangular marquees?

If the selections can be put on different layers you could certainly create an action that would select each layer in turn and apply the Average filter to each one.

If you’ll explain your workflow as it now exists, and what you eventually want to end up with it’d help.
ME
Mark_Everett
Dec 1, 2006
Phos…

The selections are generated from a custom pattern which is used as a fill (the pattern is formed from a single non-rectangular shape with a border around it). Therefore the selections are repeated on both the x and y axes. There are literally hundreds of these pattern-generated selections per image so putting each on its own layer is not really practical, particuarly given that there will be further processes after this stage which will need to be applied collectively to the resulting color patches.

I strongly suspect there’s a relatively simple way to do this, but I’ve so far failed to find it. If you have any further ideas I’d love to hear them. Thanks again for your continuing input.

Mark
P
Phosphor
Dec 1, 2006
Need more info.

HOW are the selections generated?

What is the nature of this custom pattern? Is it a tessellation?

If the selections are all the exact same size, and their offset distances (both horizontally and vertically) can be quantified as unchanging values, I can still imagine that the process could be automated.

Do you want the border to figure into the color averaging?

I could see how a dead-regular tessellation could be done this way, but again, without more info about the pattern, the shape, the nature of their repeats, etc. it’s kind of difficult to help you further.

Can you post a sample of one of the full images you want to work on, with a better description?

You can host an image at <http://www.pixentral.com>

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

Related Discussion Topics

Nice and short text about related topics in discussion sections