Next: Establishing Defaults for Plotting Attributes
Up: Specifying a Plotting Style
Previous: Synonyms for Attribute Names
Colour Attributes
The Colour attribute can be used to specify the colours of various
components of a plot. The value assigned to the attribute can be:
- An integer colour index. Colour indices can be thought of as `pen
numbers'. For instance, the string "Colour(border)=3" says ``Draw the
border using pen number 3''. The resulting colour depends on the colour of
pen 3, which can be set using PALENTRY.
- A standard X colour name, e.g. "Colour(border)=red".
- A triple of floating point red, green and blue intensity values in
the range zero to one, separated by spaces, e.g.
Colour(border)=1.0 0.0 0.0.
- An HTML colour code. This is a hash followed by 3 pairs of hexadecimal
digits giving red, green and blue intensity in the range 0 to 255,
e.g. "Colour(border)=#ffa700". Within style files, the "#"
character is used to introduce a comment, and so the colour code would be
ignored. To avoid this, the "@" character can be used in place
of "#".
If no pen is currently available in the palette with the requested
colour, then the `nearest' colour will be used instead--sometimes
this may not be very near at all! If you specifically want the requested
colour, then you should use PALENTRY first to set one of the available
pens to the required colour.
Note, if you produce a plot on an X-window and then change the representation
of pens using PALENTRY, then any components of the existing plot which were
drawn with the modified pens will change colour immediately if an
only if your X window is set to 256 colours (i.e. if you have an 8 bit
pseudo-colour visual). If you have a 16- or 24-bit display, then changes
to pen colours will only affect subsequently drawn graphics.
Next: Establishing Defaults for Plotting Attributes
Up: Specifying a Plotting Style
Previous: Synonyms for Attribute Names
KAPPA --- Kernel Application Package
Starlink User Note 95
Malcolm J. Currie & David S. Berry
2008 June 14
E-mail:ussc@star.rl.ac.uk
Copyright © 2008 Science and Technology Facilities Council