I am looking for a method to simplify the HUE of neighboring pixels so that the result is the same hue for a larger group of connected pixels. And to reduce the colors of a photo to a few fixed hues. For example: Photo of a guy in a blue suit with a red hat. I would like that suit pixels are all the exact blue hue. The original suit in the phone probably contained shifting blue values towards green etc. The face of the guy I would like to have a consistent hue value and the same for the red hat. Converting a photo to a 16 color GIF does a little bit what I am looking for but it the process does not pay attention to neighboring pixels. The effect I am looking for combines aspects of posterize, surface blur and median. I would like to turn photos into plain color shapes of same hue. A bit tricky to describe. Thank you for you thoughts.