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:
(right) The Crab Nebula at 347 GHz observed with SCUBA on the JCMT
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
The parameters that control this colour scheme are:
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
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;
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);
a `gamma factor' can be used to emphasise low or high intensity values.
The image below shows what I consider my `default' 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).
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.
This page which allows you to visualise --
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).
AIPS: from the 31DEC10 release as TVHELIX -- for examples,
see the plots at the top of this page (note: you may have to RUN NEWPARMS so
that TVHELIX is declared as verb within AIPS; and if you run a midnight job,
for 31DEC11 you should have a DOPRINT option for TVHELIX to print out the four
parameters used to control the colour scheme, which is probably useful).
casa: from version 3.1.0, in viewer as a colo(u)r scheme
DS9: it is possible to read in specific colour maps
from text files, using
ds9 -cmap file <cmap-filename>
and several version of the scheme are
available, or you can make others
karma/kvis: it is possible to read in specific colour maps from
.kf binary files, using the
Intensity → PseudoColour
(emulated) → Load
menus. Appropriate .kf files for several version of the scheme are
available (these work fine for me, under Linux
and Solaris, but may not work with all implementations, as the .kf
files are, I believe, memory dumps, so for example might need byte-swapping),
or you can make others here.
miriad: Cubehelix has been implemented in a
recent miriad release (from release 1.24), in cgdisp and
Chandra Interactive Analysis of Observations (CIAO):
Cubehelix is included, as "contributed" script chips_contrib.helix, from Version 4.6.1.
Osłowski has implemented cubehelix in the development branch
of the PSRchive radio
pulsar processing package, and also has produced ls_image.h in C++ for use with HEALpix (use the
Get_Colour_Cubehelix function instead of Get_Colour).
Oleg Smirnov (of ASTRON) has incorporated cubehelix into his .fits
viewer Tigger (see screenshot and Colormaps.py, specifically see
CubeHelixColormap.colorize()), which was added to Version 1.2 (of 17th
September 2011) of MeqTrees.
Davenport (of the University of Washington) has written a full
implementation for python, available on github.
Green (no relation!) has included several cubehelix color schemes in
his compilation of colour schemes, at cpt-city, in a
variety of formats (cpt: colour palette tables for use with the Generic Mapping
Tools; c3g: CSS3 gradients; ggr: gradients for the GNU image manipulation
program, GIMP; gpf: Gnuplot palette files; grd: (version 3) for Paint Shop Pro
and Photoshop; inc: POV-Ray colour map headers; sao: the SAO format used by the
astronomical image viewer, DS9; svg: scalar vector graphics gradients).