Why Lisbon's tiles are blue, and other things I learned in a security queue

I love the tilework that is ubiquitous across Lisbon. Here is a city with an aesthetic, and walking through the winding streets in the evening while the lights from a tram passing by glint across the patterns on the walls, well, I just want to stand and inhabit those moments for a while.

Warm streetlamp glinting across blue-and-white tiled walls at the corner of Rua do Loureiro Yellow Tram 28 rounding a curving cobblestone street in Lisbon at night
Tiled Lisbon facade illuminated by warm streetlamps at night

A big part of what gives the city its character is the tiles, the Azulejos (coming from the arabic zellij "small polished stone", not the color blue, confusing you). Now they are protected as a cultural heritage and you need permission to remove tiles from buildings, but you sometimes see ones that have been stripped naked in years past.

Some patterns appear and re-appear on different walls as you walk through the city, with the most iconic color on them being the cobalt blue. I find the shade fantastic, which might not be so surprising when you look in my wardrobe and find it bulging with blue botanical prints on white shirts. I was curious to find out why the buildings were dressed in a similar fashion, and started doing some research in the back of the taxi on the way to the airport, must be some fun historical coincidence behind that or?

Turns out that it's not one historical coincidence, but a long chain of events across centuries. The blue color of the cobalt in Persia was particularly vibrant, traded along the Silk Road, reaching China, where the process to make porcelain continued to be refined from Yuan through Ming dynasties.

Soon Europeans couldn't get enough either, and once the Dutch in Delft technique'd their way to similar results the Portuguese started incorporate the color palette and imported tiles in the late 17th century. Tilemaking had been a Portuguese thing for a long time already, but more commonly in a geometric style from Seville's Moorish workshops. So when the Dutch imports were temporarily banned, Gabriel del Barco and the domestic makers started filling the gaps, taking the blue and white palette into larger scale murals and compositions, eventually becoming exporters in turn to Brazil.

Crucially, cobalt turns out to be one of the least fickle ancient pigments, not like iron or copper which need just the right heat and oxygen levels to get the right colors out of it, and avoid boring browns. Color is also the reason China imported cobalt from Persia in the first place, was that their own contained manganese, which turned the color greyish without complicated chemistry, which is not the color I'd want on porcelain or shirts.

Not so crucial after all though, as tiles are fired at a lower temperature than porcelain, painted onto white tin glaze rather than under a clear glaze at porcelain temperatures, and the older tiles are any number of colors. History turned constraint into tradition and by the point it reached the walls of Lisbon further into fashion.

So in the end, the blue-on-white cool cobalt color is there because it just looks damn great. Nice couple of paragraphs we spent on that! What it tells you though, is that the tiles represent many centuries of remixing and evolving tastes.

Elevated view of a blue-and-white tiled building beside an ochre building above tram tracks in Lisbon Stone archway number 32 topped with blue-and-white geometric tiles and a Greek key border
Art Nouveau polychrome yellow and pink floral tiles above deep green ground-floor tiles Two adjacent Lisbon buildings clad in contrasting delicate floral and lattice tilework
Small whitewashed house on Rua dos Cegos with one framed blue-and-yellow tile panel Multi-story Lisbon building covered in allegorical polychrome tile murals of Terra, Água, Indústria and Comércio

This continues even today, as here and there are also these modern takes by artists with instagram handles. Maybe easy to roll your eyes at, but after learning what we just learnt together, I really like them, especially as you walk down a random street and get a nice little surprise on the wall.

Modern 2x2 tile portrait with a separate glazed @ogringo.75 Instagram logo tile beside it Modern 4x6 tile portrait overlaid with cobalt blue floral azulejo patterns
4x4 modern cobalt blue tile artwork of a horse with braided mane and floral patterns Blue-and-white panda street mural in azulejo style beside stalls selling vintage ceramics at Feira da Ladra

The Question

At this point in the story the taxi had arrived at the terminal, giving me plenty of time to think while we were slowly moving through the security queue (slowly). Wouldn't it be cool to have something like a 6x12 tile artwork hung up on a wall at home? And to continue the thread of incorporating modern trends into ancient arts, I've seen quite a lot of cool algorithmic plotter art, would it be possible to combine the two into a new experiment?

I feel like pen plotters have taken off the last few years, but I didn't recall any that were painting using brushes. It feels more challenging, a pen contains the ink it uses, but a brush would need dipping at regular intervals. I found an article describing Licia He having done exactly that. Take that, Plot something fun, brush it onto a glazed tile biscuit bisque (what the unfinished tiles are called, apparently) and fire it.

For the actual algorithmic art part, I went through my bookmarks. There's a lot of really cool patterns on plotterfiles, bookofshapes, Adam Fuhrer's and Étienne Jacob's websites. Looking over them, while they are really cool, most of them aren't really made to tile though.

Given the speed of the security queue, I had plenty of time to generate an artifact in a Claude chat to experiment with.

The experiments

The first version just set a few generative rules, every tile corner and edge midpoint gets some motif, like a ring, leafy stem, quatrefoil or something else. Which motif we pick is based on the hash of the seed combined with the position, so tiles that meet at a point share motifs and all the joins line up automatically. Since we had discussed brush plotters, Claude added some fake brush pressure to the lines.

Edge-matched tiles
Tap a tile to re-roll its centre motif.

It's neat, but doesn't really have much life in the output. I do like how sometimes we get these denser islands, or visual lines. We don't get any larger structures though, so while a small board works, larger ones not so much.

For the second version I tried adding Wave Function Collapse to incorporate larger structures, adding rosettes that can cover 2x2 tiles. But this didn't feel like a step forward, even while tweaking weights for how often we'd like to see them, it didn't feel like there was any intent behind their placement. Which makes sense, WFC considers local placements and constrains selection based on how edges line up, so it cannot build up to a larger composition (without going deep with weights).

Wave Function Collapse
Tap a tile, rosette or frieze to re-roll it.

I'm a big fan of architect Christopher Alexander of Pattern Language fame, and one hack I sometimes throw in is to ask if we can apply his 15 properties from the later The Nature of Order (levels of scale, gradients, roughness, boundaries and the others) to create something with a bit more life.

One version tried something like a size gradient: big shape in the centre, symmetric tiles around to support it and then calmer and smaller further away, adding a border around the whole thing. Then inspired by shape grammars I tried recursive subdivision, but it felt like a set of framed parts, not a bigger whole.

The big problem was in each case we tried to produce each property directly, so that "boundaries" became just "draw a rectangle", or "levels of scale" + "gradients" became "make it big in the middle". Something was missing in the process, and the output didn't have more life in it.

Taking a step back, what did the craftspeople throughout history who actually designed similar patterns do? Alexander has a long texts on Turkish carpetmaking in his books, which produce similar interesting patterns via a combination of process and taste. And looking back at my images, it seemed like there were ready-made 2x2 or 4x4 patterns. Ideally there is a process that gives way to the properties on their own.

Close-up of traditional ochre-and-brown Portuguese tapete tiles on a pale blue scrollwork ground with interlaced borders
Authentica Antiguidades shopfront displaying framed 2x2 Portuguese tile pattern sets on metal gates Close-up wall of monochrome brown repeating scroll-patterned Portuguese tiles

This was also the moment I felt like Claude Opus had to give way to Fable, because I wanted as much world knowledge as I could get, to pull together some of these historical threads.

The result was to try to flip things a bit, the previous attempts worked with separate motifs, and tried to place them to make them relate to each other. Inspired by historic Portuguese tapete patterns where tiles repeat across the walls like a carpet, I tried switching the algorithm to generate one small piece and let symmetry and repetition do the rest. This makes rosettes, diagonals and lattices appear at the joins as by magic (symmetry magic) when the 2x2 or 4x4 tiles are laid out next to each other.

This was a clear step up from the others. There's rhyming, local and global structure interacting in interesting ways, so as the airplane taxied out towards the runway I continued adding a few more things, like echoes of the bigger shape around it, counterchange where the figure and the ground swap colors, more shapes to pull from and more colors as well.

You can play around with it below.

Tapete
Variations
Design
More settings
Panel & ground
Sign lettering
Shapes & historic patterns
Brush & fill
Export

However, like with much generative art (especially agent involved), there is a first wow moment, and it grabs your attention. But the more you take it in, the less you feel the life in it, whereas with a lot of real Art, there is an increased reward doing the same.

I think it's telling that it only started looking more whole once we incorporated historical processes, it's a big part of Alexander's thesis as well, and while I just scratched the surface, I can piggyback on centuries of tradition to make a fun widget on a website.

So, if we manage to create art here it will be largely accidental and only through the incorporation of more and more human intent.

I'm still curious how applying this via a plotter would look, and if there's a way to incorporate more of the plotter art direction into the generations, but at this point I'm back home on the couch, and off to the next thing.

Was fun though.