I have an image img:
img
>>> img.shape (200, 200, 3)
On pixel (100, 100) I have a nice color:
>>>
If for any reason you will need to count the number of times each unique color appears, you can use this:
from collections import Counter Counter([tuple(colors) for i in img for colors in i])