Search Locate Previous Next Contents

Colour Cycle

RainPro has a pre-defined colour cycle, such that the colours are used in turn for each line or bar or pie-segment that you draw. The standard setting is ‘Navy,Maroon,Teal,Green,Purple,Gray’. To reset the cycle:

ch.Set 'Colours' 'maroon,green,teal'     © or
ch.Set 'Colours'  5 2 7 1 4           © by number

The standard colours are:

0. Black 8. Silver
1. Maroon 9. Red
2. Green10. Lime
3. Olive11. Yellow
4. Navy12. Blue
5. Purple13. Fuchsia
6. Teal14. Aqua
7. Gray15. White

If you are plotting a lot of lines on the same chart, ensure that the colour, marker and line-style cycles are of different lengths to give you the maximum number of permutations. The function Colours (in the RainPro workspace) illustrates all these for you.

Using 24-bit colour settings
RainPro extends colour support to 24-bit with the HTML convention of setting colours by RGB encoded as a hex string e.g. “#FCFCF0”. These hex strings can be used anywhere a colour name is allowed.

  ch.Set ('axis' 'med,#C86106')  © orange axis line
 © Slate heading
  ch.Set ('head' 'Sample Heading')('hfont' 'heb,24,#3E306A')
  ch.Set ('colour' '#9DC806,#78598D')('pattern' 15)
  ch.Bar 12 2½¼12    © Lime and mauve bars

The assumption is that these hex strings will be computer-generated! Otherwise just paste the values from the Paintshop Pro 5 colour wheel. Note the last example – you will probably want to use solid fills for bars and pies, particularly as these reduce the file sizes on PNG output due to better compression. It will probably pay to check the appearance of your charts on a 256-colour system, as browsers can sometimes make a very unexpected mapping of 24-bit colour.



Continue to: Line Styles
© Copyright Causeway Graphical Systems Ltd 2003