Generated image
|| #blog #2408-dailies

Design is hard

Creating random "glyphs" for each post 🎨

👋

For the past few days I've been on a mission to figure out a way to create some kind of computer-generated image for my posts.

I want to add a splash of colour to my website. But I don't want to go overboard and I want to keep things consistent. Not an easy task.

The simplest option is to pick a random image from Unsplash and call it a day. But that way any consistency goes out the window. There are just too many colours and it becomes challenging to follow any kind of theme. So I've been exploring the option to create my own images.

I'm a developer, not an artist. So obviously my approach is to write code to create an image - not create one myself 😅

I went through several iterations. Like this one:

Screenshot of first iteration - a 3x3 grid of random shapes

And this one:

Screenshot of second iteration - a banner image across the top with many random shapes

And this one:

Screenshot of third iteration - a strip of shapes going down the side of the page

But none of them felt right.

Then I saw this on a random piece of paper

Photo of source that inspired me - a kind of barcode where each line has different heights

So simple. So clean. So good. I had to copy it.

A few hours later, I had made this:

Screenshot of what I generated based on the inspiration

I was quite happy with the result, so I got to work generating a new random images for each post (I call them "glyphs" because that's a cool word) and adding the URL to the frontmatter. I think it looks pretty neat 😎


I want these glyphs to be unique, so the code I wrote is based on randomness. But I can seed it so that it always generates the same image for the same input. That way I could rerun the code for an existing post without replacing the original image.

Before I even started this, each post on my website has a unique ID - for no reason other than "IDs are cool". So I use that as a seed to ensure the image is unique.

But even though the generation is random (or as random as computers can manage) some neat patterns have already started to appear - this one and this one in particular. Randomness is fascinating.

So that is where things stand at the moment. But I can't promise I won't redo all this within a week 🤷

See you tomorrow-ish 👋


Maybe try another one?

My local LLM setup - v1 First attempt at setting up a local LLM 🤖
2024.09.17
Convert WEBP to JPG Quickly convert WEBP images to a more standard JPG format
2022.09.13
Speeding up my website Reducing the size of my website by 60% 🚀
2024.08.20