How to generalize color of images

@SALu grad that my comments helped your solution somehow.
It’s kinda disappointing that we cannot discuss more details because of the rule.
Looking forward to your next leap.