Color:Blue

Detail from The Milkmaid by Johannes Vermeer, c. 1660 at the Rijksmuseum, Amsterdam, The Netherlands.

Detail from The Milkmaid by Johannes Vermeer, c. 1660 at the Rijksmuseum, Amsterdam, The Netherlands.

Project Description

Color: Blue is a color reference dataset created from images obtained from the Rijksmuseum API. This data set lists the name of the image, the size and number of color channels it digitally displays, and an array of blue, green, and red mapping.

Methods

All steps of this process were created with the programming language, Python. Throughout the process, I used a number of Python libraries, including: Pandas, CSV, OpenCV, Numpy, Requests, Urllib, and JSON.

Data Collection & Manipulation

To obtain the information on these images, I created a RijksStudio account to obtain an API key. Once obtained, I searched for items in the collection that had blue in their description. Out of a possible 452 hits (according to the JSON I received), 370 of these records had images, and 66 were currently on display in the museum. However, of the two times that I fetched with the API, I only received 10 full records each time due to the API limits. From this JSON, I transposed the information into a list with a nested dictionary, and then into a CSV file. The CSV file was then used to find the image URL. The image was then retrieved from the web and stored locally. I then used OpenCV to analyze the separate color channels for each image as an array.

Insights

Created during the onset of the COVID-19 pandemic, this project was a way to use my skills to “travel” while in quarantine. Since reading Michel Pastoureau’s Blue: The History of a Color many years ago, I have been fascinated by the ways which history is often symbolized through color. In Blue, Pastoureau creates a ‘timeline’ of the color blue in western [art] history from the classical period through the early 2000s. In a similar vein, this project uses Python to extract information on how blue is “read” digitally through RGB values of a color.