I took a look at some color extractors source codes, and the general techniques, as I thought, is to find which colors are appearing the most often in the image by looking at each pixel. I believe that the only way to do that in Blender would be through Python, as the node system doesn’t seem fit for such a task. You can find some python scripts on github, though you will need to dowload some more modules to handle image processing in python.
@KWD you could build it by using heavy use of the normalize node with crazy math… but yeh it would be far simpler and easier to do it via scripting language… whether you use blender for its python libraries / image loading or whether use python/another programming language to do it is another debate… but pretty much the easiest way to do it is outside of blender.
Indeed… Using only the node system will be more difficult, if not impossible. My hope was to make something interactive. I hope I can elaborate a template in the future.
In Photoshop Elements (and GIMP) you can go to Image:Mode:Indexed Color and set the number of colors you want to reduce the image to. In P.E., you can then open the Color Map and see what those colors are. I’m not sure how to view the color palette in GIMP (or even if it’s possible.)
Not sure that the OP example is representative of whole movie or even the frames shown, as colour is weighted by cognitive bias. I see more reds against blues as they are culturally more dominant for me. I guess you could reduce the colours in the image then sample the results?
It would be nice to have an actual colour palette defined in Blender, not just an import from GIMP.