Count pixels by color in the browser using JavaScript and the HTML 5 Canvas Element I recently wrote a small Python script that accepted an image file and returned the count of pixels per a unique color. The script worked great for my use case (making 8-bit pixel art), and it has saved me a lot ...