I have a code which finds the top 10 colors from an image, so for that I used PIL to find all of the colors and then processed it and found the 10 most common one, but when I try it online, results are completely different. Does PIL process colors differently or what exactly what is going on here? Here is my code just in case my processing is wrong: img = Image.open(image_url) all_colors = img.getcolors(maxcolors=100000) # List with every color in image top_10_colors = all_colors[:10] # Set first 10 colors as starting list for color in all_colors[9:]: amount = color[0] top_indexes = [] for top_color in top_10_colors: top_index = top_color[0] top_indexes.append(top_index) if amount > min(top_indexes): index = top_indexes.index(min(top_indexes)) top_10_colors[index] = color sorted_top_colors = sorted(top_10_colors, key=lambda x: x[0], reverse=True) print(sorted_top_colors) print(top_10_colors), Also, website result (in greatest to least order): rgb(49,49,49) rgb(211,211,211) rgb(67,67,67) rgb(71,71,71) rgb(61,61,61) rgb(79,79,79) rgb(166,82,19) rgb(70,70,70) rgb(65,65,65) rgb(29,28,28) My result (greatest to least): [(35, 35, 35), (41, 41, 41), (36, 36, 36), (34, 34, 34), (44, 44, 44), (33, 33, 33), (31, 31, 31), (42, 42, 42), (50, 50, 50), (32, 32, 32)] Also, here is the image: Continue reading...