Various parameters let the user set colours for different action routines. Magics offers various ways to specify a colour value:
- By name - A list of 56 predefined colour names, such as BLUE, RED, RED_ORANGE.
- By RGB values - The user specifies the colours by their Red-Green-Blue value. Examples: RGB(1.,0.,0.) for red, RGB(1.,0,1.) for purple.
- By RGBA values - To specify transparency, the user can use a RGBA convention. The convetion is 0 for fully transparent to 1 for for opaque. Ex: RGBA(1.,0.,0., 0.5)
- By RGB Hex values - Similar as above the RGB(A) components are expressed in HTML hex notation. Example: #FF0000 for red.
- By HSL values - These are three numbers: the first is an angle from 0 to 360 representing Hue, then two numbers from 0 to 1 representing Saturation and Lightness. To add transparency, the user can add an alpha factor:
The following diagram shows the HSL colour wheel:
However the colours are specified, when Magics generates a colour scale from one colour to another, it internally traverses the HSL wheel either in a clockwise or anti-clockwise direction (this is user-configurable). This is important in order to understand the series of colours produced.
Please be aware that colours might be converted to a different colour space, dependent on the selected (graphical) output format. Magics++ now also supports transparency. Unfortunately not all output formats (PostScript) support this feature.
The following is a chart showing all available named colours in Magics: