# Compare temperature of two colors

Given values a and b in the appropriate color space, does perceptual psychology provide an algorithm to determine which is cooler and which is warmer? Even better, is it possible to determine how much warmer the warmer color is?

To resolve confusion, understand that there are two kinds of “color temperature”: physical (“scientific”) color temperature and artists’ color temperature. I am writing software to aid digital painters, so I am concerned with the latter.

Physical or Scientific Color Temperature

This is the mapping between light sources’ hues and Kelvin temperature values. It is based on a canonical curve in chromaticity space defined by the color of the light emitted by a black-body radiator as its temperature increases. The mapping from Kelvin to color is trivial via a priori knowledge of this canonical curve.

Mapping from color to Kelvin is harder, requiring the approximate determination of “closest correlating temperatures”. Given a light source with known color and unknown color temperature, one finds the nearest point on the canonical black-body radiation curve and chooses the associated Kelvin value.

In brief, physical or “scientific” color temperature is just about assigning Kelvin values to light sources. For more information, see http://en.wikipedia.org/wiki/Color_temperature.

Artists’ Color Temperature

Artists’ color temperature is arcane, intuitive, and weakly explained in almost all the literature I have encountered (the notable exception being Bruce MacEvoy’s online article, which I mention in my answer below). The ambiguous nature of artists’ color temperature probably owes to an anti-scientific cultural vein among contemporary illustrators.

The best I can explain is that illustrators generally believe colors like blue and green to be cool and colors like yellow and red to be warm. With practice, artists learn to see temperature differences between colors. Success in representational art depends on being able to see temperature relationships and mimic them with paint. For instance, in portrait painting, an artist needs the facility to make observations like, “Ah, the shadow side of my model’s cheek looks warmer than the tip of her nose. I need to make sure that the paint I use to represent her nose has less yellow/red in it than the paint I use to represent the shadow side of her cheek”.

I hope it is clear that physical color temperature may or may not be orthogonal to artists’ color temperature. They are principles taken from communities with almost a null intersection. Part of the reason I asked this question was to find out if the two definitions of color temperature can, in fact, be treated interchangeably.

There is no way of measuring artist’s color temperature as it is entirely relative. What colors are “warm” and “cool” depend entirely upon which colors they are juxtaposed against. In fact, many famous artists are known for their mastery of unexpected color combinations; Mark Rothko and Vincent van Gogh are two off the top of my head.

You can see this in Van Gogh’s The Night Café. The red walls become one of the cooler colors in the painting when compared to the garish yellows and greens in the foreground.

However, if you aren’t really looking for a formula but a rule of thumb, “blue is cool, orange is warm” seems to be the go-to. I believe this has something to do with the scattering of light in the atmosphere that makes sunlight yellow and the sky blue. This would mean that areas that are in shadow wouldn’t reflect any yellow light from the sun, but would still get the ambient blue light from the sky. Everyone seems to have a different theory about this though, so take mine for what you will.