Next: Python representation of architectures, Previous: Python representation of lazy strings, Up: Python API [Contents][Index]
You can assign instance of Color
to the value
of
a Parameter
instance created with PARAM_COLOR
.
Color
may refer to an index from color palette or contain components
of a color from some colorspace.
value is None
(meaning the terminal’s default color),
an integer index of a color in palette, tuple with color components
or a string. String can be a hex RGB triplet in ‘#RRGGBB’ format
or one of the following color names:
‘none’ (meaning the terminal’s default color), ‘black’, ‘red’,
‘green’, ‘yellow’, ‘blue’, ‘magenta’, ‘cyan’,
or ‘white’.
color-space should be one of the ‘COLORSPACE_’ constants. This argument tells ROCGDB which color space value belongs.
This atribute is boolean. If its value is True
then color is terminal’s
default.
This atribute is boolean. If its value is True
then color is indexed,
i.e. belongs to some palette.
This atribute is boolean. If its value is True
then this object
describes direct colour in the sense of ISO/IEC 8613-6.
This attribute exist if is_indexed
is True
. Its integer value is
index of a color in a palette.
This attribute exist if is_direct
is True
. Its value is tuple
with integer components of a color.
Returns string to change terminal’s color to this.
If is_foreground is True
, then the returned sequence will change
foreground color. Otherwise, the returned sequence will change background
color.
When color is initialized, its color space must be specified. The
available color spaces are represented by constants defined in the gdb
module:
gdb.COLORSPACE_MONOCHROME
Palette with only terminal’s default color.
gdb.COLORSPACE_ANSI_8COLOR
Palette with eight standard colors of ISO/IEC 6429 "black", "red", "green", etc.
gdb.COLORSPACE_AIXTERM_16COLOR
Palette with 16 colors. First eight are standard colors of ISO/IEC 6429 "black", "red", "green", etc. Next eight are their bright version.
gdb.COLORSPACE_XTERM_256COLOR
Palette with 256 colors. First 16 are from COLORSPACE_AIXTERM_16COLOR. Next 216 colors are 6x6x6 RGB cube. And last 24 colors form grayscale ramp.
gdb.COLORSPACE_RGB_24BIT
Direct 24-bit RGB colors.
Next: Python representation of architectures, Previous: Python representation of lazy strings, Up: Python API [Contents][Index]