Dave Green's `cubehelix' colour scheme


Implementations:

Or try your own, using javascript.
VGPS of G35.6-0.4 region Example images using the `cubehelix' colour scheme using AIPS. (left) A portion of the Galactic plane from the VGPS survey at 1.4 GHz, which includes the supernova remnant G35.6-0.4 (see: 2009MNRAS.399..177G). (right) The Crab Nebula at 347 GHz observed with SCUBA on the JCMT (see 2004MNRAS.355.1315G).

Other examples elsewhere: Sun, some geography, some edge detection.
SCUBA image of the Crab Nebula

1. Background

Many colour schemes used to display astronomical intensity images do not have an underlying increase in the perception of the brightness of the colours used (e.g. burning out to red for the high data values, but using yellow/green for intermediate data values, which are perceived as being brighter than the red).


2. A Solution

I have written up the implementation of a colour scheme -- called `cubehelix' -- which is intended to be perceived as increasing in intensity. This goes from black to white, deviating away from a pure greyscale (i.e. the diagonal from black to white in a colour cube) using a tapered helix in the colour cube, while ensuring a continuous increase in perceived intensity. The deviation from the diagonal takes into account that red, green and blue are not perceived equally in terms of intensity. This colour scheme prints as a monotonically increasing greyscale on black and white postscript devices.

This colour scheme is described in more detail in:

Please cite this paper if you use `cubehelix' in any publications.

The parameters that control this colour scheme are:

  1. the start colour (this is the direction of the predominant colour deviation from black at the start of the colour scheme, with R=1, G=2, B=3 etc.);
  2. the number of R->G->B rotations that are made from the start (i.e. black) to the end (i.e. white) of the colour scheme;
  3. a hue parameter, which controls how saturated the colours are (if this parameter is zero then the colour scheme is purely a greyscale; if the parameter is larger than 1, then some R, G or B values may be out of range near the start or end colour scheme, so will have to be clipped, although if only a few colour levels are clipped, the resulting colour scheme may still be satisfactory);
  4. a `gamma factor' can be used to emphasise low or high intensity values.

The image below shows what I consider my `default' scheme.

my `default' cubehelix colour scheme

And here is a 3-D visualisation (made with Maple) of how the colour scheme spirals around the diagonal of the colour cube (see 3d-cubehelix.mpl for the maple code if you want to explore this in 3-D further).

my `default' cubehelix colour scheme 3D

Note that since this `default' scheme uses a hue parameter of 1, no R, G or B values are clipped, and the perceived intensity is constantly increasing. If the hue parameter is increased, then the scheme becomes more colourful, but some of the R, G or B values are clipped (although the underlying perception of intensity is not exactly constantly increasing, it is still monotonically increasing). Below is a `more hue' scheme, for a hue parameter of 1.5.

a `more hue' cubehelix colour scheme

2.1 Other Examples

This page gives several other colour wedges made with different parameters (along with the corresponding colour scheme files for use in DS9 or kvis, see Section 3.2 below).

2.2 Make Your Own (with Javascript)

This page which allows you to visualise -- using javascript -- what other combinations of parameters produce, and also produce colour scheme files for DS9, or R/G/B values as decimal or hex numbers (this works in Firefox, Safari and Chrome, but not with IE).

3. Implementations

3.1 Fortran

As in the published paper, here is the Fortran 77 source of a subroutine that implements this scheme.

3.2 Astronomical packages (AIPS / casa / DS9 / karma kvis / miriad / CIAO / PSRchive / HEALpix )

This scheme is also currently implemented in:

3.3 Other implementations

Other implementations I currently know of are:

If you have another implementation, please let me know if you want it listed here.


home | addresses | teaching | research


Valid HTML 4.01!