Mixing Paints! With Code!

A talk I gave during !!Con 2016 about how computers represent color, how computers mix color, and why that’s not as straightforward as it might appear at first blush.


This was the description as written on the !!con site:

Mixing paints is fairly straightforward: with the primary colors red, yellow and blue, you make orange by mixing red and yellow, green by mixing yellow and blue, and purple by mixing red and blue.

But what if you’re trying to mix paints digitally, where the colors are reduced to a series of numbers? Suddenly, things aren’t so straightforward: how do you even blend colors? By averaging the values for the two colors? That can give pretty wonky results: using RGB notation (red-green-blue, the most common in art programs and in CSS – which doesn’t even assume yellow as a primary color!), mixing blue and yellow would give you an…interesting shade of grey. And then what happens if the color isn’t even represented with RGB?

This talk will be an introduction to how computers represent colors, as well as some techniques for how realistic (or non-realistic…) color blending is achieved by various programs and algorithms.