Posts Tagged ‘color theory’

In a Fix

Wednesday, 21 December 2011

I collided yester-day with Brouwer's Fixed-Point Theorem while writing a program that aids artists in creating on-line web galleries.

There's a notion in art of complementary color. The lighter a color is, the darker is its complement, and v.v.. And, if one locates a color on a color wheel, this complement is its diametrical opposite on the wheel. Complementary colors are used, well, to complement things. So, for example, a dark red object is thought to look best against a light green background (if one uses the classic red-yellow-blue color system) or against a light turquoise background (if one uses the red-green-blue system).

I thought (and think) that it would be a fine thing if an image should be automatically displayed on a page whose background color were the complement of the average color of the image. In keeping with this complementarity, it might seem to be a good idea for the page text to be the complement of the background, which is to say that original average color. Well, here is where Brouwer pokes his head in the room and suggests a problem.

Brouwer's Fixed-Point Theorem tells us that every continuous function f from a closed ball onto itself has a point x such that f(x) = x. A color wheel is a closed ball in two dimensions. Grey-scale is a closed ball in one dimension. Half-way between black and white is a shade of grey which is its own complement. The color dead-center on a color wheel is its own complement. So the center of the cylinder formed by the Cartesian product of light-and-dark with the color wheel is its own complement. And any colors near this center have their complements also near this center, which means that there isn't enough contrast for real usability. Color schemes such as medium grey text on a medium grey background just don't cut it.

I don't know what the best adjustment is; I'm not even sure that there is a unique best to be found. But I believe that the proper adjustment would be to alter the lightness — and only the lightness — of the foreground text, making sure that it were different from that of the background by increasing any existing relative difference. (In cases were the brightness is dead-center, a movement in either direction should be fine.)