SO(3) and the Colour Cube

A colour image, such as the one below, is a two-dimensional array of pixels. Each pixel is a point in a 3-space, the dimensions of the space being the amounts of redness, greenness, and blueness in the pixel. These three dimensions correspond to the three kinds of light-detecting cones in our eyes. Colours other than red, green and blue are formed by appropriate choices of the amounts of redness, greenness and blueness; if they are all 0% the pixel is black, if they are all 100% it is white.

Thus each pixel is a point chosen from within a cube. This is known as the colour cube, as described in the wikipedia article on color models.

We can regard this cube as being within a sphere. The rotational symmetry group of a sphere is SO(3). This page shows the action of the group SO(3) on the colour cube. The form below allows you to specify any of the group's elements, and applies it to the image below. The resulting transformed image the appears to its right.

Many of the possible rotations will cause the corners of the rotated cube to protrude from the cube of possible colour values. When this happens, all the colours will be shifted as far as necessary towards mid-grey, so that the resulting image looks subdued.

URL of image to be recoloured

-1 and 1 for each of r,g,b. These
will define the axis of rotation.
• red
• green
• blue
These three inputs specify a
vector, which will be normalised.