next up previous contents
Next: Fonts Up: Resources Previous: Geometry

Colours

The abstract data type Colour, implemented in the module Geometry.htmlGeometry, represents colours in HTk. Just like distances, the type itself is abstract, but unlike distances, there is a class ColourDesignator allowing colours to be specified in a flexible manner by overloading. Functions expecting a colour as an argument take any instance of ColourDesignator as argument, such as

which set the background or foreground of any interface element which has a colour (nearly all). Its main instances are:

The strings are named colours (red, white, black, etc.), the tuples are RGB values. (The functions of the type classes HasColour and ColourDesignator are for HTk's internal consumption only, but annoyingly appear all over the documentation.)



Christoph Lueth
Wed May 29 13:20:38 MEST 2002