Palette
Declared in lemon/color.h, in the group Miscellaneous Tools; the same class on the Doxygen site.
-
class Palette : public MapBase< int , Color >
Map
ints to differentColors.This map assigns one of the predefined Colors to each
int. It is possible to change the colors as well as their number. The integer range is cyclically mapped to the provided set of colors.This is a true reference map, so you can also change the actual colors.
Public Functions
-
inline Palette( bool have_white = false , int num = -1 )
Constructor.
- Parameters:
have_white – Indicates whether white is among the provided initial colors (
true) or not (false). If it is true, white will be assigned to0.num – The number of the allocated colors. If it is
-1, the default color configuration is set up (26 color plus optionaly the white). Ifnumis less then 26/27 then the default color list is cut. Otherwise the color list is filled repeatedly with the default color list. (The colors can be changed later on.)
-
inline void resize( int s )
Sets the number of the existing colors.
-
inline int size() const
Returns the number of the existing colors.
-
inline Palette( bool have_white = false , int num = -1 )