Library of Congress Colors
The Library of Congress has thousands of digitized images online. What are the color clusters in each image, within particular collections?
Click on a block of colors to view the source image. Each string of six swatches represents an image in the selected collection. Swatch colors are determined using k-means clustering. The colors that appear are not necessarily the most frequent colors, but the center of a cluster of color values. Since the whole image is analyzed, color targets, borders, and frames will affect the result.
This project uses thumbnail images from Library of Congress digitized collections, accessed via the loc.gov JSON API.
See the code on GitHub for this project, or:
- Jupyter notebook with the Python code used to access the API and analyze the colors.
- Download JSON and CSV files (.zip) with image URLs and colors for each collection.