Artificial Creativity in colors

in #color4 years ago

Artificial Creativity: Artificially created and colored stripes
Never heard of Artificial Creativity? Well, you looking at it right now!! The header images were created by an algorithm, not by a human artist...

What is Artificial Creativity?

Artificial Intelligence, or rather automated learning has been all over that place lately. We know that computers can learn and become skilled at certain tasks “all by themselves”. Learning is one thing, but being creative is one step further on the line towards a real intelligence. Can computercode really create idea’s, or is it just able to ‘mechanically’ interpret and manipulate data?

In my humble opinion there has always been - and there still is - just one simple creative computer function. It’s available in most systems and present as a function in almost every programming language. It’s called “Random();” and it creates a number, usually in between zero and one. It does so in a totally unpredictable way. It can thus create series of numbers in a fully unprecedented way, which is a purely creative act!

How to Artificially Create art

I set myself a goal of harnessing the Random(); functionality for making art. Just converting these random number directly into pixels, generates something most technical people would call “noise”. Maybe that could be considered art, but it’s not really interesting in its total randomness.

I realized I had to curb this randomness and direct it to a specific purpose. I decided that I would design the composition of the artwork, and that I would let the computer create the color palet. To make it interesting, I chose a design which had already been experimented with by renown artists as Gerhard Richter or Ad Arma and many others.

Randomly Striped Patterns

I started programming an algorithm that draws an abstract pattern of multicolored stripes, lines, squares, circles etc. I dictated the form, the algorithm generates the line width and the stroke color.

The line width has a random-within-limits and flat distribution. Which means every width in between the set limits, has the same probability of occurrence.

At this point the algorithm already artificially creates an art work. It’s quite dull, though, because all stripes have different widths, but all have the same color. But in essence, it’s an artwork!

Random Colors?

Okay, that was quite straightforward! Let’s do the colors… Well… that was a bit more intricate. How to create an artificial color? Surely I could have tricked everybody, by compiling a vast amount of colors and letting the algorithm select one of those precompiled colors. But that’s not really creative, so I chose the hard way.

I want the algorithm to create a color palette and do so with a bias for colors in a specific spectrum. So the algorithm should be able to create ‘pastel colors’, ‘warm colors’ or ‘winter colors’ or … well, you get my drift.

Creating Color spectra

Okay, so this is where it gets a bit tricky. We need the algorithm to compose a random color palette. But how to create a color. to begin with?

Creating a color out of random numbers

A color is not just a number: it has several ‘dimensions’. First of all, there are quite a lot of ways to define a color. Some of these color systems (or spaces), for example, are: RGB (Red, Green, Blue), HSL (Hue, Saturation, Lightness), CMYK (Cyan, Magenta, Yellow, Key) etc. etc.
Most of these systems use a set of three (sometimes 4) parameters (also called coordinates or values) to define a specific color.

This opens a vast amount of possibilities for the algorithm to generate random values! Just a few things I had to consider:

1 - The color space
2 - The distribution of possible values for each parameter
3 - The correlation of specific cohesion between the parameters

Example 1: Spectrum of random RGB-colors

To make it all a little bit less abstract, I’ll give you an example of one of the simplest ways for the algorithm the create colors: three random RGB-colors.

Pizza with random RGB-color spectrum

This is how this very simple example works:
1 - Select the RGB (8bit) color space
2 - Generate a random value for the Red parameter in between 0 and 255
3 - Do likewise for the Green and Blue
4 - Et voilà, the algorithm has created a specific color

Example 2: What happens when we change the color system?

By just changing the color space into for example HSL (and of course changing the limits for the values of the parameters), the color spectrum (the distribution of different colors) created by the algorithm will dramatically change!

  1. Select the HSL color space
  2. Select a random hue from the color circle
  3. Select a random saturation for the color
  4. Select a random lightness for the color

The colors which are generated by this HSL-algorithm are darker and often less saturated, compared with the 1st RGB-algorithm.

Circles artificially created and color using HSB scheme

More examples

There’s many different ways to make it more complicate and hopefully with more interesting results:

  1. Select the RGB color space
  2. Generate a random value for Green
  3. Generate a random value based on the outcome for Green. Red will be the sum of Green plus a random value between plus or minus 20%
  4. Generate a random value for blue in between zero and the the maximum of Red and Green

Can you figure out what spectrum of colors will be generated by this kind of algorithm ?? To give you a hint: There’s going to be yellow, but no blue!

Maybe it will look a bit like the one below...

Squares in Spring Colors

Using all kinds of formula’s and calculations I was able to make the algorithm generate colors in many different spectra. Not only spectra based on technical properties of a specific color space but also spectra that resonate a certain atmosphere or mood.
I created for example four seasonal color palettes, like spring colors above, with bright and light yellowish green colors. For Autumn the colors are warm reds and browns, for winter they're blue-ish.
The possibilities are only limited by your imagination. Think of a palet inspired on the Pizza Margherita... (see below...).

Deer in Pizza Margherita color palette

The real stuff - download for free!

Because I’m unable to run my little algorithms on HIVE, I’ve created animated GIFs to give you an impression of the results of my experiments. If you would like to do some experimenting yourself, please visit my website and create your own random artworks (FREE download of PNG and SVG images!!).

Any comments on my experiments are welcome! Creative and challenging idea’s to take it further are even more than welcome!

What do you think: would you be able to see a difference between these artificially created color-stripe-patterns and those created by humans?

Cow in winter colors