# Personally Themed Generative Art

An explanation of this year’s stocking stuffers

Ryan McShane https://ryanmcshane.com
2022-12-24

In my last blog post, I demonstrated that one could extract the dominant/most common colors in a .jpeg using $$k$$-means clustering to create a color palette, which I skillfully randomized to create thematic art.

Here, I’ll show the source images and the resulting art I’ve made.

## Batman Lunchbox

### Source Image

The initial color palette (with $$k = 30$$ clusters):

The curated color palette with modified weights and removed colors:

## World Map

### Source Image

The initial color palette (with $$k = 30$$ clusters):

The curated color palette:

## Andy Sports Fandom

### Source Image

The initial color palette (with $$k = 30$$ clusters):

The curated color palette with modified weights and removed colors:

## Armenian Color Palette

### Source Images

The initial color palette (with $$k = 50$$ clusters):

The curated color palette:

## White Mountains

### Source Image

Left: the original image taken in New Hampshire in Fall 2021. Right: an edited version of the image removing many of the brown tones – my goal was to provide the color spirit of the experience.

The initial color palette (with $$k = 50$$ clusters):

The curated color palette (regrettably, a nice orange did not appear in the $$k = 50$$ clustering, although it did appear in the $$k = 100$$ clustering I tried. I should have used bind_rows in retrospect):

## Futurama

### Source Image

The initial color palette (with $$k = 50$$ clusters):

The curated color palette:

And we can even see who/what each of these colors belong to (below). The skin tones end up making the art look weird, so I removed them as well.

## Bob’s Burgers

### Source Images

The initial color palette (with $$k = 50$$ clusters):

The curated color palette:

## Requested World Flags/Map Posters

### Source Image

There are two color palettes below, the first with $$k = 99$$ and the second with $$k = 149$$ (both with the border grey color removed). We can compare the first 99 clusters (colors) of both palettes and see that the former color palette ends with a few brown shades that are simply the average of the rare colors, while the latter is more vibrant.

Using the $$k = 150$$ clusters, we can examine a few palettes with the first 110, 120, 130, and 140 colors: