I like contemporary art and I am pretty good at coding fancy stuff as well
During a boring Swiss afternoon I challenged myself to build a contemporary art piece. Once I sketched a few concepts on paper I realized immediately that it was going to involve social media and generative art.
Code Generated Images
I am a minimalist, so I didn’t want to pollute my piece using too many elements like I did in the past. The simplest idea that came to my mind was to generate random colored square images, that could be easily uploaded on any social network platform.
…I know what you are thinking, I could have used machine learning algos and many other interesting technologies but I had just one free afternoon to make it so I decided to keep it really simple and effective…
Once the image generator microservice was ready I had to decide on which platform I would upload these images.
Twitter has already plenty of bots and its API is really developer friendly so this time I decided to use Instagram instead because by design it’s better suited to show generated images than its more text-based competitors.
I created an account called the_colour_of_the_day with the intent of uploading a generated image a day. Unfortunately I realized pretty soon that the Instagram REST API doesn’t allow bots (besides the fact that the documentation is really overcomplicated).
…at this point I opted for the plan B “the hacker way”…
After 30 minutes I was able to automate the whole uploading process, letting computers doing what they could best: simplify my life.
At the moment, my script can download the generated colored image, detect its main color, give it a name (thanks also to this great library made by my friend David), add custom tags to the post and publish it to Instagram.
I want the_colour_of_the_day bot could post one colored image a day for as long as possible, generating a wall of different colors as a contemporary art piece. Of course I didn’t want to do it manually so the last piece of this puzzle was scheduling these daily uploads.Luckily the Github Actions provide already all I needed out of the box:
I had a lot of fun working with golang and making something a bit fancier than my everyday programming tasks.
I am really curious to see if the_colour_of_the_day will remain online for enough time to become a de facto “post-contemporary art” piece. This is how the current profile page looks like: