Another post on the prismatic color space Dave Hart and I have developed for the Subjective iPhone photo editing app. This post is about changing color temperature (white point) in that model.
Suppose you want to move a color C to white. In the prismatic space you do this in the hue cross section. The most direct way is just to add the barycenric of white and subtract the barycentric of C. That works, but will make some hues move out of the triangle. For that the simplest method is to clamp and renormalize. I searched for "tungsten" at flickr and found a yellow photo. This one is clearly on purpose, but still a good example.
Now we can apply a shift to all hues:
The code for this shift/clamp/renormalize (with a vec3 C++ class) is:
The (22,18,10) was just one tenth of the 8 bit RGB color of the back wall. The one tenth is to allow me to do arithmetic in my head.