The Fontana approach to fully generative color

Attempting to find deep color variety in longform generative art

Harvey Rayner
9 min readAug 21, 2022

For those not technically inclined I recommend just reading the introduction and conclusion where I have tried to keep the focus on more general concerns of the generative art genre. The diagrams below I hope may also help readers build intuitions about the processes without having to understand the technical craft of making generative art.

Also see Fontana project overview

Introduction

Why is generative color not explored more often?

Compared to the Cambrian explosion we have recently witnessed in new generative approaches to making marks, forms, textures and compositions, projects exploring generative color have been relatively scarce. Being that color for many art lovers is such an immediate and emotive part of art it is interesting as to why the same level of innovation has not been applied to color in generative art. There are many cases of predetermined data being part of longform projects like words, textures and path data, but the almost universal reliance on preset color values is notable in an artform that distinguishes itself as being generative. My guess is that it is precisely because color seems to be so closely tied to our emotions and intangible aesthetic sensibilities that it just seems like something that cannot be tamed with logic and mathematics. Maybe it even just feels wrong for some artists to even go there. While I would not label myself as a generative purist I am fascinated with the problem of creating deep variation and new expression with generative color. Not because it is harder than anything else in art, but because it is a kinda messy problem. I personally don’t feel generative color that surprises and has expressive depth is going to come from a simple color theory, but others may disagree. Historically amongst those who have tackled taming color with systems there seems to be a temptation to take an overly formulaic or reductionist approach, maybe because on the face of it color looks simple. Every artist will tell you however that its depth is bottomless. My other gut rejection of color theory is that color seems like it is intimately and inextricably related to the forms that contain it. The forms, textures, compositions and colors are all in a sense false compartmentalizations of an artwork.

My other suspicion as to why generative color is not so widely explored is that it is not so widely explored. As creative as artists are we also just look to see what other artists are doing and get a sense of what is expected. Generative color is tricky at best if not plan dangerous so why take the plunge if nobody else is.

What might be the potential advantage of generative color in longform projects?

  1. Deeper variation within a determined range of color expression. It doesn’t have to be a full spectrum avalanche.
  2. The color as well as the forms will be a unique surprise with every output
  3. It is an authentic extension of the longform genre.
  4. Typically reduces code size.

The generative color algorithm

In the remaining article I have broken my own approach to generative color used in Fontana into 6 steps. In reality the color calculations are deeply enmeshed with the whole Fontana algorithm but I hope that abstracting it out in this way provides a general overview of this approach.

Step 1: Creating a tonally balanced spectrum

Super simple tonally balance hue method

The Fontana color algorithm starts with a simple spectrum modification. This transformation makes the standard spectrum ‘tonally balanced’ so that when we make the spectrum greyscale it is a consistent mid-grey value. Seen above is a typical gray-scale transform of the full spectrum and we can see how much darker blue is for instance than yellow. There is plenty written about why this is in color science literature so I’m not going to go into that here. The reason this is an undesirable property of color in the unaltered spectrum is that I wanted to explore subtle graduation steps in this project where the hue is incrementally shifted on each step. Differences in tone between colors can produce tonal ‘lumps’ in those graduations. My own view is that although people often talk about color combinations they like in a given artwork the tonal composition may be even more primary in terms of relaying a sense of balance or dynamism. For the first 15 years of my artistic career I worked only in monochrome for this reason. I really wanted to understand composition and for me it was easier to just throw color out of the equation and decrease the number of ‘dimensions’ that needed to be balanced. There a few very complex color models which produce a similar color space, but I feel my method here provides a simple backbone for the rest of the algorithm and I try to keep things simple wherever possible.

Step 2: Killing green and purple

Two simple linear saturation adjustments completely removing the most saturated greens and suppressing purples / ultramarine.

Why kill green and purple? It’s nothing personal. Or maybe it is. A color scientist or color theorist might say that our eye is most sensitive to green and therefore we should rain it in for a more balanced spectrum. An interior designer might say that no one wants to put purple on their walls. My reasons for carving out saturated greens and muting saturated purples is more about the artistic expression I am looking for in this project. Killing the green saturation does give more weight to the yellow and aquas which are somewhat suppressed using the balanced color model. Blues and purples being the least luminous hues in the spectrum take on a slightly sickly, rinsed-out quality (subjectively speaking) in this model and generally I’m looking for warmer, earth tones in this project. Neither these colors are prevalent in the early 19th Century design vibe I’m aiming for. Not that these colors were never used, it’s just that the dyes for these hues are maybe less color fast. That’s my non scientifically supported guess.

Step 3: Antiquing lights and darks

Three modifications: Hue shifts in the lights and darks and a pinching of the color-space to better represent the distribution of hues in this project produced by combined processes.
  1. The pinching of the spectrum at purple is just a simple way of representing the general hue occurrence in this project to give a sense of the color-space used. This pinching is for display purposes only and does not have a single direct correlation in the algorithm although combined processes do indirectly create this kind of distribution and we will get into those later.
  2. Lights are shifted towards yellow creating a vintage or retro feel. Just about all white media yellows with time so it’s easy to see why this simple transformation works.
  3. Darks are shifted towards blue / red, depending on the dominant hue in the composition. Warmer dominant hues and the darks will be shifted towards blue and cooler dominant hues and darks will be shifted towards red generally speaking. As the lights are shifted towards yellow, shifting the darks to the complementary of yellow keeps the whole color space in balance.

Step 4: Defining background color-space

Simple color-space domain defining where main background color can be selected from

What was the process that arrived at this color value island? It was simply just a process of starting with an unlimited modified color-space from above and eliminating areas that did not fit into the overall expression I was aiming at. No theory as such. I will say that generally for this project warm and cool hues worked in the background, but the foreground elements were much more tightly constrained to the warmer hues. In nature this is often what we see so maybe it could be theorized that this general approach is more in tune with what we are used to seeing and therefore more comforting.

Fontana uses a single background value, however every time it is referenced in the ‘over-painting’ function RGB values are randomly shifted by up to 4%. Over-painting is a process that substitutes the color of an element that has any corner lying outside of the canvas boundary with a near background color. It also increases the element’s transparency so that if it lays on top of other elements it creates a wash-like effect.

Fontana: Examples with over-painting

Step 5: Defining foreground color-space and hue/tonal modulation

The middle detail in the diagram below shows the limited domain of hue gradient starting points and direction of gradient hue shifting. Top and bottom cells show example hue/tonal modulation maps

This is as far as we can go without talking about the way Fontana is composed in terms of the arrangement of elements. I have previously mentioned a color algorithm, but in reality, the color expression is created from a number of compositional processes that cannot be teased apart. Fountain elements are built from adjacent cells that alternately modulate from dark to light and also progressively shift in hue. The degree of light dark modulation also continuously changes in degree. The example color paths shown above show how these modulations are calculated. The hue range can be greater or less than what is seen above and in extreme cases the hue can shift into the blues and purples if the number of adjacent cells in a given group is great enough. Adding to the complexity of the possible color variation is the multiple laying of semi transparent elements. The transparency of an element is calculated by its proximity to the ’source’ (see below). Elements that are centered more towards the ‘fringe’ (see below) of a fountain being more opaque. This means colors become more muted the closer to the source unless the composition is a ‘Single’, in which case the opacity is greater at the source and diminishes near the canvas edge.

Fontana composition type: Adjacent
Fontana composition type: Single

Step 6: Adding three types of accents (The seasoning)

  1. White accent: (Salt) This is simply where an element’s color is substituted for white. This happens prior to the light modification which shifts all lights slightly towards yellow.
  2. Sub accent: (Herbs) This sets the element to a mid light-dark value and sets saturation and opacity to full. Saturation being limited by the basic tonally balance hue model. These accents show us what the underlying hue is when the elements are modulating close to black and white. See the mustard colored sub accent in the example above.
  3. Main accent: (Spices) Like many family recipes some things need to be kept secret and only passed down to relatives. Of course it’s easy to find in my code and if you do you will see it’s not that complex, but it’s also not something simple like complementaries or something related to color theory. It’s just a bunch of logic and ranges with a sprinkle of randomness to get some subtle variation.

Conclusion

Color and form are not two

After everything has been said about what different palettes may evoke, or why certain combinations of color may be or may not be pleasing, at the end of the day I have to follow my gut on what approach to take. I may use concepts and logic as part of my process, but it really is an intuitive voice in the end that has the final say. Having said that, I am also learning to trust the gut instincts of my wife and daughter who have taken a keen interest in the development of this project. I feel a more feminine instinct helps to balance my personal liking for bold and forceful color statements. So I own them both a special thanks for the feedback they have offered specifically in relation to color.

The last thing I have to say is a reiteration of where I began in the first chapter. What I am seeking is not a definitive generative color algorithm that I can apply to multiple projects. I am seeking in every new project to find an approach where the form grows out of the color and the color grows out of the form. Not two separate algorithms, but a unified holistic approach where the color, forms and composition emerge from the single process.

For more details about this approach to color I talk about it in the context of the Fontana project in this Interview with Ponyo from Art Blocks

--

--

Harvey Rayner

Artist (aka patterndotco) - Just trying to make art that has not been made before: http://discord.gg/XzzRasxg