How to pick colors from a image in openframeworks?

I want to pick up different colors from an image? Or to calculate the most color in an image? How to realize this in openframeworks?

Thanks very much for you reply!
Best wishes!

hi, this Git repo by @roymacdonald is a example of what your asking by pixels
hope it helps

Thanks for your help!