Inspired by Nordlicht I made a small program that finds the most dominant colors in movies. Using k-means clustering, it builds a color palette with 32 colors and calculates the number of pixels with smallest distance to the cluster centers.
As it would be far too computationally expensive if clustering worked on the complete set of full-sized images of a movie, I only extracted one frame per second and scaled it down to 16×16 pixels. Moreover, I cropped black borders from each frame, and removed all logos at the beginning as well as the credits at the end. This avoids having meaningless black pixels in the clustering process.
Some results are shown in the following images. The pie charts show the colors and their frequency of occurence. The bar below shows just the colors.


Big Buck Bunny


District 9


The Lord of the Rings: The Fellowship of the Ring


Mad Max: Fury Road


Shrek


Star Wars: Episode I – The Phantom Menace


Star Wars: Episode IV: A New Hope


The Dark Knight


The Social Network
The code is on GitHub. The D3-based generator for the pie charts can also be found on JSBin.